PDA

View Full Version : Kali 2.0 pysocks issue - not backward compatible (weevely broken)



nullsign
2015-09-03, 17:58
Recently I noticed while using weevely; that sockshandler does not exist in pysocks in Kali 2.0



# weevely http://[REDACTED]/backdoor.txt%00 password
Traceback (most recent call last):
File "./weevely.py", line 98, in <module>
main(arguments)
File "./weevely.py", line 48, in main
modules.load_modules(session)
File "/usr/share/weevely/core/modules.py", line 24, in load_modules
(module_group, module_name), fromlist=["*"]
File "/usr/share/weevely/modules/shell/php.py", line 4, in <module>
from core.channels.channel import Channel
File "/usr/share/weevely/core/channels/channel.py", line 8, in <module>
import sockshandler
ImportError: No module named sockshandler


it seems the latest pysocks release didn't include the sockahandler backward-compat file:: => https://github.com/Anorov/PySocks

This means weevely is broken in Kali 2.0 until a fix is provided, possibly other tools could be impacted; provided they require the sockshandler module.

icekvot
2015-09-15, 10:16
I fix it on my kali 2.0 system:

1) Download last PySocks from python site https://pypi.python.org/pypi/PySocks/
2) Unzip archive into /tmp/ directory
3) Run "chmod 755 /tmp/PySocks/setup.py"
4) Run build "/tmp/PySocks/setup.py build"
5) Run install "/tmp/PySocks/setup.py install"

Now you can connect to you backdoor from weevely.

hijackerdev
2016-08-14, 19:55
and what about the missing arguments

$ ./weevely.py
[+] weevely 3.0
[!] Error: too few arguments

[+] Run terminal to the target
weevely <URL> <password>

[+] Load session file
weevely session <path>

[+] Generate backdoor agent
weevely generate <password> <path>

samsab
2016-12-07, 14:41
Thanks a lot icekvot ... that worked for me.