Security/Password: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| (9 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<syntaxhighlight lang= | {|class='wikitable' | ||
|valign='top' style='width:50%'| | |||
<syntaxhighlight lang='bash'> | |||
cat <<'EXE'| sudo bash | cat <<'EXE'| sudo bash | ||
apt-get update;echo | apt-get update;echo | ||
| Line 6: | Line 8: | ||
EXE | EXE | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|valign='top' style='width:50%'| | |||
|} | |||
==Password » Random== | |||
{|class='wikitable sortable' style='text-align:right' | |||
!scope='col' rowspan='2' style='width:540px'|Access Key | |||
!scope='col' colspan='4' style='width:240px'|Time (Seconds) | |||
|- | |||
!scope='col' style='width: 60px'|Real | |||
!scope='col' style='width: 60px'|User | |||
!scope='col' style='width: 60px'|System | |||
!scope='col' style='width: 60px'|Status | |||
|- | |||
|style='text-align:left'| <code>time echo "$(cat /dev/urandom|tr -dc 'A-Za-z0-9'|head -c 20)"</code> || 0.007 || 0.001 || 0.012 ||style='text-align:center'| 🟢 | |||
|- | |||
|style='text-align:left'| <code>time echo "$(openssl rand -base64 16|tr -d /=+|cut -c1-20)"</code> || 0.009 || 0.002 || 0.012 ||style='text-align:center'| 🟡 | |||
|- | |||
|style='text-align:left'| <code>time echo "$(openssl rand -hex 12|tr -d /=+|cut -c1-20)"</code> || 0.008 || 0.003 || 0.009 ||style='text-align:center'| 🟡 | |||
|- | |||
|style='text-align:left'| <code>time echo "$(makepasswd --chars 20)"</code> || 0.023 || 0.020 || 0.003 ||style='text-align:center'| 🔴 | |||
|} | |||
{|class='wikitable sortable' style='text-align:right' | |||
!scope='col' rowspan='2' style='width:540px'|Secret Key | |||
!scope='col' colspan='4' style='width:240px'|Time (Seconds) | |||
|- | |||
!scope='col' style='width: 60px'|Real | |||
!scope='col' style='width: 60px'|User | |||
!scope='col' style='width: 60px'|System | |||
!scope='col' style='width: 60px'|Status | |||
|- | |||
|style='text-align:left'| <code>time echo "$(cat /dev/urandom|tr -dc 'A-Za-z0-9'|head -c 40)"</code> || 0.006 || 0.003 || 0.007 ||style='text-align:center'| 🟢 | |||
|- | |||
|style='text-align:left'| <code>time echo "$(openssl rand -base64 32|tr -d /=+|cut -c1-40)"</code> || 0.007 || 0.003 || 0.009 ||style='text-align:center'| 🟡 | |||
|- | |||
|style='text-align:left'| <code>time echo "$(openssl rand -hex 24|tr -d /=+|cut -c1-40)"</code> || 0.009 || 0.003 || 0.011 ||style='text-align:center'| 🟡 | |||
|- | |||
|style='text-align:left'| <code>time echo "$(makepasswd --chars 40)"</code> || 0.021 || 0.016 || 0.005 ||style='text-align:center'| 🔴 | |||
|} | |||
==Playground== | ==Playground== | ||
{| | {|class='wikitable mw-collapsible' | ||
|valign='top'| | !scope='col' style='text-align:left' colspan='3'| | ||
<syntaxhighlight lang= | Playground | ||
|- | |||
|valign='top' style='width:33%'| | |||
<syntaxhighlight lang='bash'> | |||
nmap vpn.shahed.biz --reason -Pn --top 20 | nmap vpn.shahed.biz --reason -Pn --top 20 | ||
nmap vpn.shahed.biz --reason -Pn -p25,465,587,993 | nmap vpn.shahed.biz --reason -Pn -p25,465,587,993 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|valign='top'| | |valign='top' style='width:34%'| | ||
<syntaxhighlight lang= | <syntaxhighlight lang='bash'> | ||
sudo tail -n100 -f /var/log/auth.log | sudo tail -n100 -f /var/log/auth.log | ||
sudo tail -n100 -f /var/log/kern.log | sudo tail -n100 -f /var/log/kern.log | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|valign='top'| | |valign='top' style='width:33%'| | ||
<syntaxhighlight lang= | <syntaxhighlight lang='bash'> | ||
sudo cat /etc/shadow|grep nobody | sudo cat /etc/shadow|grep nobody | ||
last | last | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|- | |- | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight lang= | <syntaxhighlight lang='bash'> | ||
sudo apt-get install makepasswd | sudo apt-get install makepasswd | ||
echo 'sadaqah!'|makepasswd --crypt-md5 --clearfrom=- | echo 'sadaqah!'|makepasswd --crypt-md5 --clearfrom=- | ||
| Line 38: | Line 78: | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight lang= | <syntaxhighlight lang='bash'> | ||
makepasswd --chars 12 --count 5 --crypt-md5 | makepasswd --chars 12 --count 5 --crypt-md5 | ||
makepasswd --chars 12 --count 5 --crypt | makepasswd --chars 12 --count 5 --crypt | ||
| Line 44: | Line 84: | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight lang= | <syntaxhighlight lang='bash'> | ||
makepasswd --chars 12 --count 5 | makepasswd --chars 12 --count 5 | ||
makepasswd --chars 12 | makepasswd --chars 12 | ||
| Line 51: | Line 91: | ||
==References== | ==References== | ||
{| | {|class='wikitable mw-collapsible' | ||
|valign='top'| | !scope='col' style='text-align:left' colspan='3'| | ||
References | |||
|- | |||
|valign='top' style='width:33%'| | |||
* [[Apache Basic Authentication|Security » HTTP » Basic Authentication]] | * [[Apache Basic Authentication|Security » HTTP » Basic Authentication]] | ||
* [[OpenLDAP/BackSQL|Security » OpenLDAP » BackSQL]] | * [[OpenLDAP/BackSQL|Security » OpenLDAP » BackSQL]] | ||
* [https://github.com/khorben/makepasswd Security » <code>makepasswd</code> » SCM] | * [https://github.com/khorben/makepasswd Security » <code>makepasswd</code> » SCM] | ||
* [https://manpages.ubuntu.com/manpages/trusty/man1/makepasswd.1.html Security » <code>makepasswd</code>] | * [https://manpages.ubuntu.com/manpages/trusty/man1/makepasswd.1.html Security » <code>makepasswd</code>] | ||
* [[Security/Certificate|Security » Certificate]] | |||
* [[ZA Proxy|Security » ZA Proxy]] | * [[ZA Proxy|Security » ZA Proxy]] | ||
* [[Security/Domain|Security » Domain]] | |||
* [[Spring Security|Security » Spring]] | * [[Spring Security|Security » Spring]] | ||
* [[HTTP Security|Security » HTTP]] | * [[HTTP Security|Security » HTTP]] | ||
* [[Java/Security|Security » Java]] | * [[Java/Security|Security » Java]] | ||
|valign='top'| | |valign='top' style='width:34%'| | ||
* [[SSH/Public Key Authentication|Security » SSH » Public Key Authentication]] | |||
* [[Security/Container/Snyk|Security » Container » Snyk]] | |||
* [[Security/Container/Trivy|Security » Container » Trivy]] | |||
* [[Security/Certificate/TLS|Security » Certificate » TLS]] | |||
* [https://askubuntu.com/questions/700712/how-to-install-wireshark Security » Wireshark] | |||
* [[Jasypt|Security » Jasypt]] | |||
* [[Vault|Security » Vault]] | |||
|valign='top' | |valign='top' style='width:33%'| | ||
|- | |- | ||
|valign='top'| | |valign='top'| | ||
Latest revision as of 07:41, 20 January 2026
cat <<'EXE'| sudo bash
apt-get update;echo
apt list -a --upgradable;echo
apt-get install -y makepasswd;echo;apt-get clean
EXE
|
Password » Random
| Access Key | Time (Seconds) | |||
|---|---|---|---|---|
| Real | User | System | Status | |
time echo "$(cat /dev/urandom|tr -dc 'A-Za-z0-9'|head -c 20)" |
0.007 | 0.001 | 0.012 | 🟢 |
time echo "$(openssl rand -base64 16|tr -d /=+|cut -c1-20)" |
0.009 | 0.002 | 0.012 | 🟡 |
time echo "$(openssl rand -hex 12|tr -d /=+|cut -c1-20)" |
0.008 | 0.003 | 0.009 | 🟡 |
time echo "$(makepasswd --chars 20)" |
0.023 | 0.020 | 0.003 | 🔴 |
| Secret Key | Time (Seconds) | |||
|---|---|---|---|---|
| Real | User | System | Status | |
time echo "$(cat /dev/urandom|tr -dc 'A-Za-z0-9'|head -c 40)" |
0.006 | 0.003 | 0.007 | 🟢 |
time echo "$(openssl rand -base64 32|tr -d /=+|cut -c1-40)" |
0.007 | 0.003 | 0.009 | 🟡 |
time echo "$(openssl rand -hex 24|tr -d /=+|cut -c1-40)" |
0.009 | 0.003 | 0.011 | 🟡 |
time echo "$(makepasswd --chars 40)" |
0.021 | 0.016 | 0.005 | 🔴 |
Playground
|
Playground | ||
|---|---|---|
nmap vpn.shahed.biz --reason -Pn --top 20
nmap vpn.shahed.biz --reason -Pn -p25,465,587,993
|
sudo tail -n100 -f /var/log/auth.log
sudo tail -n100 -f /var/log/kern.log
|
sudo cat /etc/shadow|grep nobody
last
|
sudo apt-get install makepasswd
echo 'sadaqah!'|makepasswd --crypt-md5 --clearfrom=-
|
makepasswd --chars 12 --count 5 --crypt-md5
makepasswd --chars 12 --count 5 --crypt
|
makepasswd --chars 12 --count 5
makepasswd --chars 12
|
References
|
References | ||
|---|---|---|