【网络安全】Penelope:一款功能强大的Shell处理工具
關于Penelope
Penelope是一款功能強大的Shell處理工具,該工具的主要功能是在利用RCE漏洞的過程中,替代netcat并作為Shell捕捉器來使用。該工具可以在Linux和macOS上工作,只需要安裝并配置好Python 3環境即可。該工具沒有任何的第三方依賴,使用起來非常簡單,跨平臺性也很好。
功能介紹
自動將Shell更新為PTY;
記錄與目標的交互歷史信息;
從目標下載文件;
將文件上傳至目標設備;
將預設腳本上傳至目標設備;
生成備份Shell;
支持多會話;
支持多個監聽器;
可以通過利用漏洞導入并在同一終端上獲取Shell;
Penelope通過設置“set DisablePayloadHandler True”來禁用Metasploit的默認Shell處理器,并與Metasploit結合使用。
該工具支持Windows Shell,但還未實現自動更新功能。
工具下載
廣大研究人員可以使用下列命令將該項目源碼克隆至本地:
git clone https://github.com/brightio/penelope.git工具基礎使用
penelope.py # Listening for reverse shells on 0.0.0.0:4444penelope.py 5555 # Listening for reverse shells on 0.0.0.0:5555penelope.py 5555 -i eth0 # Listening for reverse shells on eth0:5555penelope.py -c target 3333 # Connect to a bind shell on target:3333工具使用樣例
使用場景一
在不使用參數的情況下執行Penelope,并獲取反向Shell;
按下F12鍵來解綁會話,并切換至主菜單;
運行“recon”命令向目標設備上傳預設值的特權腳本;
再次與會話交互,確認腳本已成功上傳;
再次按下F12鍵來解綁會話,并從目標下載/etc目錄;
按下Ctrl + D鍵盤終止會話并退出運行;
使用場景二
添加額外的監聽器并顯示所有的監聽器;
與會話1交互;
生成額外的備份會話;
顯示所有的會話;
命令行參數
positional arguments:PORT Port to listen/connect to depending on -i/-c options. Default: 4444Reverse or Bind shell?:-i , --address IP Address or Interface to listen on. Default: 0.0.0.0-c , --connect Bind shell HostHints:-a, --hints Show sample payloads for reverse shell based on the registered listeners-l, --interfaces Show the available network interfaces-h, --help show this help message and exitVerbosity:-Q, --silent Show only errors and warnings-X, --extra-silent Suppress all logging messagesLogging:-L, --no-log Do not create session log files-T, --no-timestamps Do not include timestamps on logsMisc:-H, --no-history Disable shell history on target-P, --plain Just land to the menu-S, --single-session Accommodate only the first created session-C, --no-attach Disable auto attaching sessions upon creation-U, --no-upgrade Do not upgrade shells Debug:-d, --debug Show debug messages-NP, --no-python Simulate python absence on target-NB, --no-bash Simulate bash absence on target菜單選項
use [sessionID|none]Select a sessionsessions [sessionID]Show active sessions. When followed by <sessionID>, interact with thatsessioninteract [sessionID]Interact with a sessionkill [sessionID|all]Kill a sessiondownload <glob>...Download files and folders from the targetopen <glob>...Download files and folders from the target and open them locally upload <glob|URL>...Upload files and folders to the target. If URL is specified then it isdownloaded locally and then uploaded to the targetrecon [sessionID]Upload preset reconnaissance scripts to the targetspawn [sessionID]Spawn a new session. Whether it will be reverse or bind, depends onthe current session.upgrade [sessionID]Upgrade the session's shell to "PTY". If it fails attempts to upgradeit to "Advanced". If this fail too, then falls back to "Basic" shell.dir|. [sessionID]Open the session's local folder. If no session is selected, opens thebase folder.listeners [<add|stop> <Interface|IP> <Port>]Add or stop a Listener. When invoked without parameters, it shows theactive Listeners.connect <Host> <Port>Connect to a bind shellhintsShow sample commands to run on the targets to get reverse shell, basedon the registered listenersresetReset the local terminalhistoryShow menu historyhelp [command]Show menu help or help about specific commandDEBUGOpen debug consoleSET [<param> <value>]Set options. When invoked without parameters it shows current optionsexit|quit|q|Ctrl+DExit penelope最后
關注我,持續更新!!!
私我獲取【網絡安全學習資料·攻略】
總結
以上是生活随笔為你收集整理的【网络安全】Penelope:一款功能强大的Shell处理工具的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【网络安全】Windows恶意软件Baz
- 下一篇: 【网络安全】xhCMS代码审计思路