Penelope - Shell HandlZXI

admin 2021年9月13日06:24:17评论128 views字数 2025阅读6分45秒阅读模式

 

aHR0cHM6Ly9naXRodWIuY29tL2JyaWdodGlvL3BlbmVsb3Bl

 

这是一个没有第三方依赖的脚本它的主要目的是在利用 RCE 漏洞期间取代 netcat 作为 shell 捕获器。它适用于 Linux 和 macOS,唯一的要求是 Python3。

 

主要功能包括:

  • 自动将 shell 升级到 PTY(包括自动调整大小)
  • 记录与目标的交互
  • 从目标下载文件
  • 上传文件到目标
  • 将预设脚本上传到目标
  • 生成备份壳
  • 多个会话
  • 多个听众
  • 可以通过漏洞导入并在同一终端上获取 shell

 

        

        Penelope 可以通过禁用默认处理程序与 metasploit 漏洞利用 

set DisablePayloadHandler True

        

        它支持 Windows shell,但尚未实现自动升级。然而,它可以从优秀的项目接受PTY壳ConPtyShell@antonioCoco实现了 PTY 的自动调整大小。

使用方法:

 

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

演示

  1. 不带参数执行 penelope 并获得反向 shell
  2. 按 F12 分离会话并转到主菜单
  3. 运行 'recon' 命令将预设的 privesc 脚本上传到目标
  4. 再次与会话交互,确认脚本已上传
  5. 再次使用 F12 分离并从目标下载 /etc 目录
  6. 终止会话并使用 Ctrl-D 退出

Penelope - Shell HandlZXI

  1. 添加额外的侦听器并显示所有侦听器
  2. 与会话 1 交互
  3. 产生 2 个额外的备份会话
  4. 显示所有会话

Penelope - Shell HandlZXI

        还包括两个示例漏洞利用模拟脚本,以演示如何在同一终端上导入 penelope 并获取 shell。此外,还包含一个 bash 脚本,可使用 xdotool 自动将 Unix shell 升级到 PTY。

 

特征

  • 当前下载/上传/生成/升级命令仅在 Unix shell 上受支持。也将为 Windows shell 实现这些命令。
  • 转发端口
  • 编辑命令:在本地打开远程文件,进行更改并保存后,将其上传到目标
  • 能够指定在目标和/或主菜单上自动运行的命令列表
  • 用于禁用所有日志记录的选项开关,而不仅仅是会话。
  • 在目标上执行本地脚本并在本地文件上获取输出
  • 短命令的主菜单自动完成
  • 下载/上传进度条
  • 下载/上传自动完成
  • IPv6
  • 加密
  • UDP

 

positional arguments:  PORT                  Port to listen/connect to depending on -i/-c options. Default: 4444
Reverse or Bind shell?:  -i , --address        IP Address or Interface to listen on. Default: 0.0.0.0  -c , --connect        Bind shell Host
Hints:  -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 exit
Verbosity:  -Q, --silent          Show only errors and warnings  -X, --extra-silent    Suppress all logging messages
Logging:  -L, --no-log          Do not create session log files  -T, --no-timestamps   Do not include timestamps on logs
Misc:  -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

 

本文始发于微信公众号(Khan安全攻防实验室):DQpQZW5lbG9wZSAtIFNoZWxsIEhhbmRsZXI

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2021年9月13日06:24:17
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   Penelope - Shell HandlZXIhttp://cn-sec.com/archives/541668.html

发表评论

匿名网友 填写信息