Skip to content

Commit

Permalink
Adding support to Faraday using RPC Api
Browse files Browse the repository at this point in the history
  • Loading branch information
f-amato committed Jan 23, 2014
1 parent cb5a204 commit 22dc742
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,7 @@ will fill out for you (agentmd5, agentsha256, and agentsize) that can't be done
Data::Dump
Digest::MD5
Time::HiRes
RPC::XML

.:: [MORE INFORMATION] ::.

Expand Down
5 changes: 5 additions & 0 deletions docs/CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Version 2.0.6 - 17-01-2014
--------------------------
-Adding support to Faraday www.faradaysec.com - RPC Api connection


Version 2.0.5 - 06-05-2013
--------------------------
- Adding support for Windows by Elian Gidoni
Expand Down
2 changes: 2 additions & 0 deletions isrcore/main.pm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ use Data::Dump qw(dump);
my $options = {
'port' => { 'val' => 80, 'desc' => 'Webserver listening port'},
'sslport' => { 'val' => 443, 'desc' => 'Webserver SSL listening port'},
'RPCfaraday' => { 'val' => "http://127.0.0.1:9876/", 'desc' => 'Faraday RPC Server'},
'faraday' => { 'val' => 0, 'desc' => 'Enable RPC Faraday connection'},
'debug' => { 'val' => 1, 'desc' => 'Debug mode'},
'DNSPort' => { 'val' => 53, 'desc' => 'Listen Name Server port'},
'DNSEnable' => { 'val' => 1, 'desc' => 'Enable DNS Server ( handle virtual request on modules )'},
Expand Down
21 changes: 19 additions & 2 deletions isrcore/shellz.pm
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ use isrcore::ASCIITable;
use isrcore::dnsserver;
#external modules
use Data::Dump qw(dump);

require RPC::XML;
require RPC::XML::Client;

#ignore child's process to avoid zombie
$SIG{CHLD} = 'IGNORE';
Expand Down Expand Up @@ -440,6 +441,22 @@ sub console_cmd {
if ($file) {
$self->{'webserver'}->{'users'}->{$ip}->{$module}->{'file'}=($tfile) ? "$tfile\n$md5,$sha256,'$cwd',$file" :"$md5,$sha256,'$cwd',$file";
}

#RPC faraday connection
if ($self->{'isrmain'}->{'Base'}->{'options'}->{'faraday'}->{'val'} == 1){
eval {
my $cli = RPC::XML::Client->new($self->{'isrmain'}->{'Base'}->{'options'}->{'RPCfaraday'}->{'val'});
my $resp = $cli->send_request('devlog','Importing evilgrade information');
my $h_id = $cli->send_request('createAndAddHost',$ip,"unknown");

my $var = RPC::XML::array->new("URL-http://github.com/infobyte/evilgrade/");
my $v_id = $cli->send_request('createAndAddVulnToHost',$h_id->value,"Evilgrade injection -".$module,"This ip is interacted with evilgrade framework see the notes inside the host for more information",$var,"HIGH");
#add note host id, note, value
my $n_id = $cli->send_request('createAndAddNoteToHost',$h_id->value,"Evilgrade -".$module,$action) if ($action);
my $n_id2 = $cli->send_request('createAndAddNoteToHost',$h_id->value,"Evilgrade file -".$module,($tfile) ? "$tfile\n$md5,$sha256,'$cwd',$file" :"$md5,$sha256,'$cwd',$file");

}
}

}
##########################################################################
Expand All @@ -452,7 +469,7 @@ sub smry_configure {"Configure <module-name>"}
sub smry_reload {"Reload to update all the modules"}
sub smry_start {"Start webserver"}
sub smry_status {"Get webserver status"}
sub smry_stop {"Stop webserver"}
sub smry_stop {"Stop webserverR"}
sub smry_restart {"Restart webserver"}
sub smry_vhosts {"Show vhosts enable"}

Expand Down

0 comments on commit 22dc742

Please sign in to comment.