From f1c264df4eaff8a64ec2ba0d87b334e4545758eb Mon Sep 17 00:00:00 2001 From: Cx01N Date: Sun, 11 Oct 2020 13:34:46 -0400 Subject: [PATCH] Updated readme and formatting --- README.md | 11 +++++++---- SocksServer.py => plugins/SocksServer.py | 13 +++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) rename SocksServer.py => plugins/SocksServer.py (94%) diff --git a/README.md b/README.md index 07d408a..d9e171d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # SocksProxyServer-Plugin -The SocksProxy Plugin runs a SocksProxy server for [Invoke-SocksProxy](https://github.com/BC-SECURITY/Invoke-SocksProxy) -entirely contained in [Empire](https://github.com/BC-SECURITY/Empire/). +The Socks Proxy Plugin runs a Socks Proxy Server for [Invoke-SocksProxy](https://github.com/BC-SECURITY/Invoke-SocksProxy) +that supports Socks 4 and 5 protocols. This plugin is entirely contained in [Empire](https://github.com/BC-SECURITY/Empire/) +and runs in the background. Use command `socksproxyserver` to configure and start the Socks Proxy Server. You can shutdown +the socks proxy by running the command `socksproxyserver kill` or by exiting Empire. ![image](https://user-images.githubusercontent.com/20302208/95637897-d8221480-0a47-11eb-8a69-3f132fe5d079.png) @@ -16,9 +18,10 @@ Prerequisites: ![image](https://user-images.githubusercontent.com/20302208/95636534-49f85f00-0a44-11eb-87c1-754a2368febb.png) -2. Plugins are automatically loaded into Empire as of 3.4.0, otherwise run ```plugin attack``` +2. Plugins are automatically loaded into Empire as of 3.4.0, otherwise run ```plugin SocksServer``` ![image](https://user-images.githubusercontent.com/20302208/95636737-b5dac780-0a44-11eb-9f82-34dcb66c24fe.png) ## Future Features -- List of active servers (similar to agents and listeners) +- Add multiple socks server support (similar to agents and listeners) +- Add UDP and bind request support \ No newline at end of file diff --git a/SocksServer.py b/plugins/SocksServer.py similarity index 94% rename from SocksServer.py rename to plugins/SocksServer.py index 9ceea30..76bb700 100644 --- a/SocksServer.py +++ b/plugins/SocksServer.py @@ -12,7 +12,7 @@ class Plugin(Plugin): - description = "Launches a SocksProxy Server to run in the background of Empire" + description = "Launches a Socks Proxy Server to run in the background of Empire" def onLoad(self): self.commands = {'do_socksproxyserver': {'Description': 'Launch a Socks Proxy Server', @@ -39,16 +39,14 @@ def register(self, mainMenu): def do_socksproxyserver(self, line): "Launches a SocksProxy Server to run in the background of Empire" - parts = line.split(' ') if parts[0].lower() == "kill": - print(self.proxy.running) if self.proxy.running: self.proxy.end() elif not self.proxy.running: self.proxy.start() else: - print(helpers.color("[!] SocksProxy Server Already Running!")) + print(helpers.color("[!] Socks Proxy Server Already Running!")) def shutdown(self): """if the plugin spawns a process provide a shutdown method for when Empire exits else leave it as pass""" @@ -125,7 +123,7 @@ def server(self, handler_port, proxy_port, certificate, private_key): dock_socket2.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) dock_socket2.bind(('127.0.0.1', int(proxy_port))) dock_socket2.listen(5) - print(helpers.color("\n[+] Socks Server listening on: " + proxy_port)) + print(helpers.color("\n[+] Socks Proxy Server listening on: " + proxy_port)) while True: try: client_socket2, address = dock_socket2.accept() @@ -161,7 +159,7 @@ def forward(self, source, destination): pass def start(self): - print(helpers.color("[*] Starting Socks Proxy")) + print(helpers.color("[*] Starting Socks Proxy Server")) handler_port = input(helpers.color("[>] Enter Handler Port [443]: ")) if handler_port == "": self.handler_port = "443" @@ -175,7 +173,6 @@ def start(self): self.process.start() def end(self): - print(helpers.color("[!] Killing Socks Server")) + print(helpers.color("[!] Killing Socks Proxy Server")) self.running = False self.process.terminate() -