Code Monkey home page Code Monkey logo

regeorg's Introduction

reGeorg

  _____   ______  __|___  |__  ______  _____  _____   ______
 |     | |   ___||   ___|    ||   ___|/     \|     | |   ___|
 |     \ |   ___||   |  |    ||   ___||     ||     \ |   |  |
 |__|\__\|______||______|  __||______|\_____/|__|\__\|______|
                    |_____|
                    ... every office needs a tool like Georg

[email protected] / @_w_m__

[email protected] / @trowalts

[email protected] / @kamp_staaldraad

Version

1.0

Dependencies

reGeorg requires Python 2.7 and the following modules:

  • urllib3 - HTTP library with thread-safe connection pooling, file post, and more.

Usage

$ reGeorgSocksProxy.py [-h] [-l] [-p] [-r] -u  [-v]

Socks server for reGeorg HTTP(s) tunneller

optional arguments:
  -h, --help           show this help message and exit
  -l , --listen-on     The default listening address
  -p , --listen-port   The default listening port
  -r , --read-buff     Local read buffer, max data to be sent per POST
  -u , --url           The url containing the tunnel script
  -v , --verbose       Verbose output[INFO|DEBUG]

  • Step 1. Upload tunnel.(aspx|ashx|jsp|php) to a webserver (How you do that is up to you)

  • Step 2. Configure you tools to use a socks proxy, use the ip address and port you specified when you started the reGeorgSocksProxy.py

** Note, if you tools, such as NMap doesn't support socks proxies, use proxychains (see wiki)

  • Step 3. Hack the planet :)

Example

$ python reGeorgSocksProxy.py -p 8080 -u http://upload.sensepost.net:8080/tunnel/tunnel.jsp

License

MIT

regeorg's People

Contributors

joda32 avatar staaldraad avatar vulp1n3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

regeorg's Issues

SSL Error

Hello, Please add the possibility to bypass ssl certificate check.
i'm getting this error
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='X.X.X.X', port=None): Max retries exceeded with url: /tunnel.aspx (Caused by SSLError(SSLEOFError(8, u'EOF occurred in violation of protocol (_ssl.c:590)'),))

High CPU load on PHP mode

I try to run this on a PHP server(Apache+PHP 5.4)and it seems make high CPU load and make server down.
can you tell me if i use a wrong version of PHP?

Ideas for new Features

This issue is just a list of ideas that I want to add to reGeorg.

Stealthier Communication and Tunnel Endpoints

The following should lower the conspicuousness in log files and the chance of being detected:

  • Move all communication from URL parameters to the HTTP headers
  • Allow the mimicking of web server's default error responses
    • 403 for tunnels with names of directory index/default documents (e. g., index.php, default.aspx, etc.)
    • 404 for tunnels with other names
  • Enhance overall error handling (500 errors)

SOCKS4a and SOCKS5 with Remote DNS Resolution

  • Implement proper SOCKS4 and SOCKS5 handling with support for remote DNS resolution (similar to #13 but for all tunnel endpoints)

ProtocolError: ('Connection aborted.', error(10054, ''))

[�[1m�[1;37mINFO�[0m �[0m] Log Level set to [INFO]
[�[1m�[1;37mINFO�[0m �[0m] Starting socks server [127.0.0.1:1480], tunnel at [http://www.***/tunnel.php]
[�[1m�[1;37mINFO�[0m �[0m] Checking if Georg is ready
[�[1m�[1;37mINFO�[0m �[0m] Georg says, 'All seems fine'
[�[1m�[1;31mERROR�[0m �[0m]
Exception in thread Thread-1:
Traceback (most recent call last):
File "E:\Program Files\Python27\lib\threading.py", line 801, in __bootstrap_inner
self.run()
File "reGeorgSocksProxy.py", line 351, in run
self.closeRemoteSession()
File "reGeorgSocksProxy.py", line 246, in closeRemoteSession
response = conn.request("POST", self.httpPath + "?cmd=disconnect", params, headers)
File "E:\Program Files\Python27\lib\site-packages\urllib3\request.py", line 72, in request
**urlopen_kw)
File "E:\Program Files\Python27\lib\site-packages\urllib3\request.py", line 150, in request_encode_body
return self.urlopen(method, url, **extra_kw)
File "E:\Program Files\Python27\lib\site-packages\urllib3\connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "E:\Program Files\Python27\lib\site-packages\urllib3\util\retry.py", line 367, in increment
raise six.reraise(type(error), error, _stacktrace)
File "E:\Program Files\Python27\lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen
chunked=chunked)
File "E:\Program Files\Python27\lib\site-packages\urllib3\connectionpool.py", line 377, in _make_request
httplib_response = conn.getresponse(buffering=True)
File "E:\Program Files\Python27\lib\httplib.py", line 1121, in getresponse
response.begin()
File "E:\Program Files\Python27\lib\httplib.py", line 438, in begin
version, status, reason = self._read_status()
File "E:\Program Files\Python27\lib\httplib.py", line 394, in _read_status
line = self.fp.readline(_MAXLINE + 1)
File "E:\Program Files\Python27\lib\socket.py", line 480, in readline
data = self._sock.recv(self._rbufsize)
ProtocolError: ('Connection aborted.', error(10054, ''))

error: Connection reset by peer

python reGeorgSocksProxy.py -u http://my.server.com/tunnel.php

bro., I got some error info:
[INFO ] Log Level set to [INFO]
[INFO ] Starting socks server [127.0.0.1:8888], tunnel at [http://my.server.com/tunnel.php]
[INFO ] Checking if Georg is ready
[INFO ] Georg says, 'All seems fine'
[ERROR ] HTTPConnectionPool(host='my.server.com', port=None): Max retries exceeded with url: http://my.server.com/tunnel.php?cmd=connect&target=syndication.twitter.com&port=443 (Caused by ProtocolError('Connection aborted.', error(104, 'Connection reset by peer')))
[ERROR ] HTTPConnectionPool(host='my.server.com', port=None): Max retries exceeded with url: http://my.server.com/tunnel.php?cmd=connect&target=syndication.twitter.com&port=443 (Caused by ProtocolError('Connection aborted.', error(104, 'Connection reset by peer')))
[ERROR ] HTTPConnectionPool(host='my.server.com', port=None): Max retries exceeded with url: http://my.server.com/tunnel.php?cmd=connect&target=syndication.twitter.com&port=443 (Caused by ProtocolError('Connection aborted.', error(104, 'Connection reset by peer')))
[ERROR ] HTTPConnectionPool(host='my.server.com', port=None): Max retries exceeded with url: http://my.server.com/tunnel.php?cmd=connect&target=syndication.twitter.com&port=443 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xb6d0a2ec>: Failed to establish a new connection: [Errno 104] Connection reset by peer',))

hlep me, plz.

Error using reGeorg as socks5 sock for curl

Whether I use reGeorg as socks5 tunnel by curl with the string

$ curl --socks5 localhost:8888 http://www.google.com
curl: (7) Failed to receive SOCKS5 connect request ack.
$

And reGeorg sock daemon prints out an error

$ python reGeorgSocksProxy.py -u http://localhost/environment/tunnel.php
...
[INFO   ]  Log Level set to [INFO]
[INFO   ]  Starting socks server [127.0.0.1:8888], tunnel at [http://localhost/environment/tunnel.php]
[INFO   ]  Checking if Georg is ready
[INFO   ]  Georg says, 'All seems fine'
[ERROR  ]  timed out
[ERROR  ]  'NoneType' object has no attribute '__getitem__'

Please note that reGeorge works properly if I use --proxy4 as curl option.

nginx/php-fpm

Does reGeorg phps work on nginx?

I couldn't run them.
Under nginx/php7.0-fpm ob_end_flush() doesn't cause nginx to return response.
I tried number of combinations ob_* and configurations from here stackoverflow, but doesn't help.

USERID is not considered when parsing socks4

In func parseSocks4 of reGeorgSocksProxy.py, Link, variable USERID is NOT considerd, in the WinINet socks proxy situation, it will add USERDI by default, which will cause error HTTP datapacket:

image

urllib3 version

hi, using reGeorg on kali linux i have this error:
[ERROR ] 'HTTPConnectionPool' object has no attribute 'close'

digging a bit it seems an outdated version of urllib3 (kali ships 1.3-3), the issue has been fixed installing urllib3 using pip

do you think urllib3 version should be mentioned in requirements list or can you handle this code-side?

thanks

dl function fails in tunnel.php on line30

5.3.0 dl() is now disabled in some SAPIs due to stability issues.
The only SAPIs that allow dl() are CLI and Embed. Use the Extension Loading Directives instead.

Wrong way to parse Socks5 protocol

In parseSocks5 function:

nmethods, methods = (sock.recv(1), sock.recv(1))

The methods field's length is variable. In some socks5 client, an error will be throwed. Such as curl #9

Should write like this:

nmethods = sock.recv(1)
sock.recv(ord(nmethods))

It seems like no one has been maintaining this repo for a long time, I think my pr will not be handled. So if anyone is going to rewrite this repo, remember to fix it

Distribution request

I am a developer for the ArchAssault project, we would like to distribute this but we noticed its missing a license file. Can you please add one?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.