penelope
penelope copied to clipboard
[bug] 在windows反弹shell时,会因为正则无法提取版本号导致错误崩溃。
➜ Access penelope 80 -i tun0
[+] Listening for reverse shells on 192.168.45.166:80
➤ 🏠 Main Menu (m) 💀 Payloads (p) 🔄 Clear (Ctrl-L) 🚫 Quit (q/Ctrl-C)
(Penelope)>
Oops...🐞
────────────────────────────────────────────────────────────────────────────────
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/root/.local/pipx/venvs/penelope/bin/penelope.py", line 2007, in __init__
if self.determine():
File "/root/.local/pipx/venvs/penelope/bin/penelope.py", line 2411, in determine
self.version = re.search(rf"Microsoft Windows \[Version (.*)\]", response, re.DOTALL)[1]
TypeError: 'NoneType' object is not subscriptable
────────────────────────────────────────────────────────────────────────────────
Penelope version: 0.13.9
Python version: 3.10.12 (main, Feb 4 2025, 14:57:36) [GCC 11.4.0]
System: #141-Ubuntu SMP Fri Jan 10 21:18:28 UTC 2025
正常使用nc获得的响应如下:
➜ Access rlwrap nc -lvnp 80
Listening on 0.0.0.0 80
Connection received on 192.168.144.187 50107
SOCKET: Shell has connected! PID: 804
Microsoft Windows [Version 10.0.17763.2746]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\xampp\htdocs\uploads>
目前我是选择直接注释掉self.version的正则提取部分作为临时处理方案,希望后续能够修复这个bug,优化一下支持
by the way 确实挺好用!!
When obtaining a reverse shell on Windows, the program crashes due to regex failing to extract the version number.
Currently, I have temporarily worked around the issue by commenting out the regex extraction part for self.version. Hopefully, this bug can be fixed later with better version number support.
By the way, it really works great!!
@bamuwe can you please tell me which payload you used? I cannot reproduce this bug.