Skip to content

Commit

Permalink
Added hydra documentation (from thc-hydra repository)
Browse files Browse the repository at this point in the history
  • Loading branch information
antoninoLorenzo committed Jul 23, 2024
1 parent 96f086a commit a2acd51
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions data/json/thc-hydra.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"title": "HOW TO USE",
"content": "If you just enter `hydra`, you will see a short summary of the important\noptions available.\nType `./hydra -h` to see all available command line options.\n\nNote that NO login/password file is included. Generate them yourself.\nA default password list is however present, use \"dpl4hydra.sh\" to generate\na list.\n\nFor Linux users, a GTK GUI is available, try `./xhydra`\n\nFor the command line usage, the syntax is as follows:\n For attacking one target or a network, you can use the new \"://\" style:\n hydra [some command line options] PROTOCOL://TARGET:PORT/MODULE-OPTIONS\n The old mode can be used for these too, and additionally if you want to\n specify your targets from a text file, you *must* use this one:\n\n```\nhydra [some command line options] [-s PORT] TARGET PROTOCOL [MODULE-OPTIONS]\n```\n\nVia the command line options you specify which logins to try, which passwords,\nif SSL should be used, how many parallel tasks to use for attacking, etc.\n\nPROTOCOL is the protocol you want to use for attacking, e.g. ftp, smtp,\nhttp-get or many others are available\nTARGET is the target you want to attack\nMODULE-OPTIONS are optional values which are special per PROTOCOL module\n\nFIRST - select your target\n you have three options on how to specify the target you want to attack:\n 1. a single target on the command line: just put the IP or DNS address in\n 2. a network range on the command line: CIDR specification like \"192.168.0.0/24\"\n 3. a list of hosts in a text file: one line per entry (see below)\n\nSECOND - select your protocol\n Try to avoid telnet, as it is unreliable to detect a correct or false login attempt.\n Use a port scanner to see which protocols are enabled on the target.\n\nTHIRD - check if the module has optional parameters\n hydra -U PROTOCOL\n e.g. hydra -U smtp\n\nFOURTH - the destination port\n this is optional, if no port is supplied the default common port for the\n PROTOCOL is used.\n If you specify SSL to use (\"-S\" option), the SSL common port is used by default.\n\n\nIf you use \"://\" notation, you must use \"[\" \"]\" brackets if you want to supply\nIPv6 addresses or CIDR (\"192.168.0.0/24\") notations to attack:\n hydra [some command line options] ftp://[192.168.0.0/24]/\n hydra [some command line options] -6 smtps://[2001:db8::1]/NTLM\n\nNote that everything hydra does is IPv4 only!\nIf you want to attack IPv6 addresses, you must add the \"-6\" command line option.\nAll attacks are then IPv6 only!\n\nIf you want to supply your targets via a text file, you can not use the ://\nnotation but use the old style and just supply the protocol (and module options):\n hydra [some command line options] -M targets.txt ftp\nYou can also supply the port for each target entry by adding \":<port>\" after a\ntarget entry in the file, e.g.:\n\n```\nfoo.bar.com\ntarget.com:21\nunusual.port.com:2121\ndefault.used.here.com\n127.0.0.1\n127.0.0.1:2121\n```\n\nNote that if you want to attach IPv6 targets, you must supply the -6 option\nand *must* put IPv6 addresses in brackets in the file(!) like this:\n\n```\nfoo.bar.com\ntarget.com:21\n[fe80::1%eth0]\n[2001::1]\n[2002::2]:8080\n[2a01:24a:133:0:00:123:ff:1a]\n```"
},
{
"title": "LOGINS AND PASSWORDS",
"content": "You have many options on how to attack with logins and passwords\nWith -l for login and -p for password you tell hydra that this is the only\nlogin and/or password to try.\nWith -L for logins and -P for passwords you supply text files with entries.\ne.g.:\n\n```\nhydra -l admin -p password ftp://localhost/\nhydra -L default_logins.txt -p test ftp://localhost/\nhydra -l admin -P common_passwords.txt ftp://localhost/\nhydra -L logins.txt -P passwords.txt ftp://localhost/\n```\n\nAdditionally, you can try passwords based on the login via the \"-e\" option.\nThe \"-e\" option has three parameters:\n\n```\ns - try the login as password\nn - try an empty password\nr - reverse the login and try it as password\n```\n\nIf you want to, e.g. try \"try login as password and \"empty password\", you \nspecify \"-e sn\" on the command line.\n\nBut there are two more modes for trying passwords than -p/-P:\nYou can use text file which where a login and password pair is separated by a colon,\ne.g.:\n\n```\nadmin:password\ntest:test\nfoo:bar\n```\n\nThis is a common default account style listing, that is also generated by the\ndpl4hydra.sh default account file generator supplied with hydra.\nYou use such a text file with the -C option - note that in this mode you\ncan not use -l/-L/-p/-P options (-e nsr however you can).\nExample:\n\n```\nhydra -C default_accounts.txt ftp://localhost/\n```\n\nAnd finally, there is a bruteforce mode with the -x option (which you can not\nuse with -p/-P/-C):\n\n```\n-x minimum_length:maximum_length:charset\n```\n\nthe charset definition is `a` for lowercase letters, `A` for uppercase letters,\n`1` for numbers and for anything else you supply it is their real representation.\nExamples:\n\n```\n-x 1:3:a generate passwords from length 1 to 3 with all lowercase letters\n-x 2:5:/ generate passwords from length 2 to 5 containing only slashes\n-x 5:8:A1 generate passwords from length 5 to 8 with uppercase and numbers\n-x '3:3:aA1&~#\\\\ \"\\'<{([-|_^@)]=}>$%*?./§,;:!`' -v generates lenght 3 passwords with all 95 characters, and verbose. \n```\n\nExample:\n\n```\nhydra -l ftp -x 3:3:a ftp://localhost/\n```"
},
{
"title": "HOW TO SCAN/CRACK OVER A PROXY",
"content": "The environment variable HYDRA_PROXY_HTTP defines the web proxy (this works\njust for the http services!).\nThe following syntax is valid:\n\n```\nHYDRA_PROXY_HTTP=\"http://123.45.67.89:8080/\"\nHYDRA_PROXY_HTTP=\"http://login:[email protected]:8080/\"\nHYDRA_PROXY_HTTP=\"proxylist.txt\"\n```\n\nThe last example is a text file containing up to 64 proxies (in the same\nformat definition as the other examples).\n\nFor all other services, use the HYDRA_PROXY variable to scan/crack.\nIt uses the same syntax. eg:\n\n```\nHYDRA_PROXY=[connect|socks4|socks5]://[login:password@]proxy_addr:proxy_port\n```\n\nfor example:\n\n```\nHYDRA_PROXY=connect://proxy.anonymizer.com:8000\nHYDRA_PROXY=socks4://auth:[email protected]:1080\nHYDRA_PROXY=socksproxylist.txt\n```\n"
}
]

0 comments on commit a2acd51

Please sign in to comment.