Hydra syntax help


Rendering Error in layout Widget/Social: Call to a member function exists() on null. Please enable debug mode for more information.
More
9 years 3 months ago - 9 years 3 months ago #128 by Scar
Hydra syntax help was created by Scar
Hey guys!

I'm Scar and I'm wanting to crack my own router password with Hydra-THC.
I'm using windows 7 and Cyswin. I have a laptop with windows 8.1 ready to go.
What i'm currently trying, with explanation and everything i'm not sure of underlined:

hydra 192.168.5.1 https-form-post "index.php:usernamefld^C^USER^&passwordfld=^PASS^:Username or Password incorrect:H=Cookie:security;low;PHPSESSID=e39428acfd434a5add602282ed6928ff" -l admin -P test.txt -s 80 -w 30 -o attack.txt

my router's IP is 192.168.5.1
with Tamperdata in firefox i figured out it's https-form-post based
the website is https://192.168.5.1/index.php so i figured i'll only need index.php
After that comes the commands for username / password. I tracked it from the POSTDATA of tamperdata, which says usernamefld and passwordfld so i think i need that.
the POSTDATA also adds login=login at the end, no idea what this is for
Then i added the exact message i get when i make a mistake, i am not sure if this is also what i need to use
this is followed by a random guess that i need to add cookie information at low security that i also got from tamperdata
and then just comes the normal stuff. I'm not sure if the -w 30 is needed or the -o attack.txt

I'd appreciate ANY help i could get on this because it's all pretty new to me. The picture is basically my login screen


And i thought port forwarding made me an ICT nerd
Attachments:
Last edit: 9 years 3 months ago by thaGH05T.
More
9 years 3 months ago #132 by thaGH05T
Replied by thaGH05T on topic Hydra syntax help
Thanks for posting. I will be moving this thread when I get a chance to hacking tools. As far as your syntax goes I will have to look into hydra again to verify the syntax. I don't think you will be needing any cookies on a brute force though. I usually pass in the basic type of login how to get there my username:password list file and the output directory and file name. But your login form is a bit different than most routers. Yours is a web page where most are browser popups requested from the page. I am afk at the moment but will get back to you asap.
More
9 years 3 months ago - 9 years 3 months ago #133 by Scar
Replied by Scar on topic Hydra syntax help
Hey GH05T,
I'll be honest; I've never seen a pop-up based login for routers/modems in the Netherlands.. This router specifically uses pfSense, an open source firewall-router software thingie.
I started hydra with a syntax like you said (ping, name, password list, port followed by http-get / ) however that's for a GET based login, and I'm 90% sure mine's a POST based one. This makes things more difficult I think.. This website helped me abit to get on the right track but you need to know quite some variables it seems.

And i thought port forwarding made me an ICT nerd
Last edit: 9 years 3 months ago by thaGH05T.
More
9 years 3 months ago #134 by thaGH05T
Replied by thaGH05T on topic Hydra syntax help
What you can do is open up developer tools on your browser and then go to network tab. Attempt a login and catch where its posting. Also, I'm sure you have tried but... Does your router have brute force protection?
More
9 years 3 months ago #135 by Scar
Replied by Scar on topic Hydra syntax help
I am not 100% sure what you mean with 'where' it's posting. I've added a screencap just to be sure :p Do you mean the server? (lighttpd/1.4.35)
Also I have no idea if it's bruteforce proof tbh, I know it's possible to put some anti-bruteforce protection on it though.


And i thought port forwarding made me an ICT nerd
Attachments:
More
9 years 3 months ago #137 by thaGH05T
Replied by thaGH05T on topic Hydra syntax help
Well, the way to test is to try a few times to to get into it with the wrong creds. That will let you know if there is BF protection. As far as the command go, from what information I have gathered from you I think you need to use this syntax.

hydra 192.168.5.1 https-form post "/index.php:usernamefld^USER^&passwordfld=^PASS^:Username or Password incorrect:H=Cookie: security=low; PHPSESSID=e39428acfd434a5add602282ed6928ff"-S -v -f -l /path/to/logins -p /path/to/passwords -o /use/instead/of/STDOUT

I am sure you are familiar with the breakdown so I will spare you the time. Just read the command carefully and compare it to your own. Of course you will need to replace many parameters with the current info such as the session ID and file paths. If for some reason you still can't figure it out you may need to get me a couple screen shots of the page code etc. in order to help you.
More
9 years 3 months ago #138 by Scar
Replied by Scar on topic Hydra syntax help
Hej!

I'd LOVE to try out your changes to the code, however it seems it has some nasty kind of protection: I entered like 20 bullshit combinations and now i can't connect to 192.168.5.1 anymore. My phone can however. I tried using a mobile wi-fi hotspot but it wouldn't work either. I think I'll install Cygwin on my laptop when I have the time..

And i thought port forwarding made me an ICT nerd
More
9 years 3 months ago #147 by thaGH05T
Replied by thaGH05T on topic Hydra syntax help
It blacklisted the IP. Just use another device and change the blacklist to enable it again. Brute force is being protected. I would try maybe telnet brute force if enabled.

Who's Online

We have 228 guests and no members online

N00BZ

  • ljamal
  • ljamal74
  • mikeg2atest
  • ducchinhbui
  • anjarezt

Cookies