美文网首页
密码破解

密码破解

作者: 阿尼奥赛哟 | 来源:发表于2020-05-19 17:49 被阅读0次

1. kali系统自带两个字典文件

两个系统字典文件:

/usr/share/wordlists/metasploit/password.lst : 88397行

/usr/share/wordlists/nmap.lst : 5084 行

root@kali:/usr/share/wordlists# ls -l



2. 使用crunch创建字典文件

生成最小一位 最长四位由数字组成的密码字典

root@kali:~# crunch 1 4 0123456789 -o ~/wordlist.txt 

生成4个字母和1980组合的密码字典:

# crunch 8 8 abcdefghiABCDE -t @@@@1980 -o ~/wordlist.txt

生成4个小写字母4个数字组合的密码字典:

# crunch 8 8 -t @@@@%%%% -o ~/wordlist.txt

调用密码库charset.lst, 生成最小为1,最大为8,元素为密码库

# crunch 1 8 -f /usr/share/crunch/charset.lst mixalpha-numeric-all-space -o wordlist.txt


 3. 用cupp.py生成个人专属密码

根据个人信息生成专属密码
root@kali:/opt/cupp# python3 cupp.py -i

> First Name: 

> Surname: 

> Nickname:

> Birthdate (DDMMYYYY): 01022000

> Partners) name:

> Partners) nickname:

> Partners) birthdate (DDMMYYYY):

> Child's name:

> Child's nickname:

> Child's birthdate (DDMMYYYY):

> Pet's name:

> Company name:

> Do you want to add some key words about the victim? Y/[N]:

> Do you want to add special chars at the end of words? Y/[N]:

> Do you want to add some random numbers at the end of words? Y/[N]:



4.John本地离线密码破解

5. Linux安全设置

#cat /var/log/secure | awk '/Failed/{print $(NF-3)}' | sort | uniq -c | awk '{print $2" = "$1;}'

禁止root账户登录:

# vi /etc/ssh/sshd_config

将PermitRootLogin yes 修改为PermitRootLogin no

修改远程ssh登录端口:

# vi /etc/ssh/sshd_config

比如将#port 22 修改为port 5922

# systemctl restart sshd

# vi /etc/ssh/sshd_config

RSAAuthentication yes #RSA认证

PubkeyAuthentication yes #开启公钥验证

AuthorizedKeysFile .ssh/authorized_keys #验证文件路径

PasswordAuthentication no #禁止密码认证

PermitEmptyPasswords no #禁止空密码

设置密码复杂度:

在/etc/login.defs文件,里面几个选项

PASS_MAX_DAYS   90   #密码最长过期天数

PASS_MIN_DAYS   80   #密码最小过期天数

PASS_MIN_LEN    10   #密码最小长度

PASS_WARN_AGE   7   #密码过期警告天数

禁止使用密码登陆,使用RSA私钥 登陆

# vi /etc/ssh/sshd_config

RSAAuthentication yes #RSA认证

PubkeyAuthentication yes #开启公钥验证

AuthorizedKeysFile .ssh/authorized_keys #验证文件路径

PasswordAuthentication no #禁止密码认证

PermitEmptyPasswords no #禁止空密码

相关文章

网友评论

      本文标题:密码破解

      本文链接:https://www.haomeiwen.com/subject/xdgbohtx.html