Jump to content

Search the Community

Showing results for tags 'tool'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Talk
    • Everything Else
    • Gaming
    • Questions
    • Business and Enterprise IT
    • Security
    • Hacks & Mods
    • Applications & Coding
    • Trading Post
  • WiFi Pineapple
    • WiFi Pineapple TETRA
    • WiFi Pineapple NANO
    • WiFi Pineapple Mark V
    • WiFi Pineapple Mark IV
    • Pineapple Modules
    • WiFi Pineapples Mark I, II, III
  • Hak5 Gear
    • Hak5 Cloud C²
    • Plunder Bug
    • Bash Bunny
    • Signal Owl
    • USB Rubber Ducky
    • Packet Squirrel
    • LAN Turtle
    • Screen Crab
    • Shark Jack
  • O.MG (Mischief Gadgets)
    • O.MG DemonSeed EDU
  • Hak5 Shows
  • Community
    • Forums and Wiki
    • #Hak5
  • Projects
    • SDR - Software Defined Radio
    • Community Projects
    • Interceptor
    • USB Hacks
    • USB Multipass
    • Pandora Timeshifting

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Enter a five letter word.

Found 5 results

  1. REDD

    [TOOL] SharkLib

    SharkLib - SharkJack Quick Payload Library This Tool was created less than 24 hours after having a "SharkJack", I realized how much of a pain it is to swap back and forth between prior loaded Payloads. So after 7 hours of debugging, testing, and pulling my hair out. - I give to you "SharkLib". SharkLib allows you to Backup/Restore prior loaded Payloads, via SSH Terminal. No more needing to have to "go deploy another script", you can easily use C2 or any SSH Terminal Service to switch your desired payloads. Features: Installs to Local System to allow ease of access of "SharkLib". (/usr/sbin) Syncs on Exit to prevent data corruption in payloads. Easy to use Menu Interface. Switch payloads in seconds with SSH. I will post the Code in here, until Hak5 tells me what "category" this tool falls under in the GitHub Repo. The Code: #!/bin/bash # # Title: SharkLib # Author: REDD of Private-Locker # Version: 1.3 # # This Script is to be ran on the Hak5 SharkJack itself. This Script # makes switching between local stored payloads quick and simple. # VERS=1.3 LIB_DIR="/root/payload/sharklib" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" START_DIR="$DIR" INSTALL_DIR="/usr/sbin" EXEC_FILE="sharklib" PAYLOAD_DIR="/root/payload" PAYLOAD_FILE="$PAYLOAD_DIR/payload.sh" function install_sharklib() { if [[ "$DIR" != $INSTALL_DIR ]]; then if [ ! -f "$INSTALL_DIR/$EXEC_FILE" ]; then printf " -> Installing SharkLib into System for Easy Access.\n" sleep 1; cp -rf $0 $INSTALL_DIR/$EXEC_FILE printf " -> Fixing Permissions of $EXEC_FILE in $INSTALL_DIR.\n" sleep 1; chmod +x $INSTALL_DIR/$EXEC_FILE fi fi } function view_payload() { printf "\n"; cat "$PAYLOAD_FILE"; printf "\n"; read -n 1 -s -r -p "Press any key to return to Menu.."; sharklib_menu; } function remove_sharklib() { if [ -f "$INSTALL_DIR/$EXEC_FILE" ]; then printf "\n" printf "Removing SharkLib from local system.\n" rm -rf "$INSTALL_DIR/$EXEC_FILE"; printf "Removing SharkLib Payload Library.\n" rm -rf "$LIB_DIR"; printf "SharkLib has been fully removed.\n\n" fi } function free_space() { FREE_MEM="$(df -h $PWD | awk '/[0-9]%/{print $(NF-2)}')" } function header() { free_space; printf "\n" printf "O========================================O\n" printf "| SharkLib - SharkJack Quick Payload |\n" printf "| Library |\n" printf "O=O====================================O=O\n" printf " | %-29s |\n" "$SHARKLIB_TITLE" printf " O====================================O\n" printf " | Free Space: %-6s Vers: %-3s | \n" "$FREE_MEM" "$VERS" printf " O================================O \n" printf " -Huge Thanks goes to Hak5! \n" printf "\n" } function backup_payload() { clear; SHARKLIB_TITLE=" Backup Payloads" header; if [ -f "$PAYLOAD_FILE" ]; then printf "\n" printf " 1. Backup current payload to SharkLib\n" printf "\n" printf " 2. Return to Previous Menu.\n" printf "\n" printf " Select a Menu Item by # and press ENTER: " read BACKUP_INPUT printf "\n" if [ "$BACKUP_INPUT" = "1" ]; then printf " What would you want to call this Payload?: " read BACKUP_INPUT_1 if [[ "$BACKUP_INPUT_1" != "" ]]; then if [ ! -d "$LIB_DIR/$BACKUP_INPUT_1" ]; then mkdir -p "$LIB_DIR/$BACKUP_INPUT_1" cp -rf "$PAYLOAD_FILE" "$LIB_DIR/$BACKUP_INPUT_1/payload.sh" printf " Created Payload directory named $BACKUP_INPUT_1\n" sleep 2; sharklib_menu; else printf " Removing Old Copy and using New Copy of $BACKUP_INPUT_1\n" rm -rf "$LIB_DIR/$BACKUP_INPUT_1" mkdir -p "$LIB_DIR/$BACKUP_INPUT_1" cp -rf "$PAYLOAD_FILE" "$LIB_DIR/$BACKUP_INPUT_1/payload.sh" sleep 2; sharklib_menu; fi else if [ ! -d "$LIB_DIR/Payload" ]; then printf " Backing up Payload into Default Payload directory..\n" mkdir -p "$LIB_DIR/Payload" cp -rf "$PAYLOAD_FILE" "$LIB_DIR/Payload/payload.sh" sleep 2; sharklib_menu; else printf " Removing Old Copy and using New Copy of $LIB_DIR/Payload\n" rm -rf "$LIB_DIR/Payload" mkdir -p "$LIB_DIR/Payload" cp -rf "$PAYLOAD_FILE" "$LIB_DIR/Payload/payload.sh" sleep 2; sharklib_menu; fi fi elif [ "$BACKUP_INPUT" = "2" ]; then sharklib_menu; else backup_payload; fi else printf " No Payload in $PAYLOAD_DIR.\n" fi } function delete_payload() { DELETE_INPUT=NULL clear; SHARKLIB_TITLE=" Delete Payloads" header; cd "$LIB_DIR" DIR_CNT="NULL" DIR_CNT=$(ls "$LIB_DIR" | grep -v total | wc -l) declare -a DIRS i=1 for d in */; do DIRS[i++]="${d%/}" done if [ "$DIR_CNT" -lt "1" ]; then printf " There are no Payloads to Delete. \n\n" printf " Returning to Previous Menu.\n" sleep 2; sharklib_menu; fi printf " There are ${#DIRS[@]} Payloads in SharkLib:\n" for((i=1;i<=${#DIRS[@]};i++)); do printf " %2d. %-20s\n" "$i" "${DIRS[i]}" done PAYLOAD_TOTAL=${#DIRS[@]} PLUS_QUIT=$((PAYLOAD_TOTAL+1)) printf "\n" printf " %2d. %-20s\n" "$PLUS_QUIT" "Return to Previous Menu." printf "\n" printf " Please choose a Payload by Number: " read DELETE_INPUT printf "\n" if [[ "$DELETE_INPUT" == "$PLUS_QUIT" ]]; then printf " Returning to Previous Menu.\n" sleep 2; sharklib_menu; elif [[ "$DELETE_INPUT" == "" ]]; then printf " Please Input a choice.\n" sleep 2; delete_payload; elif ! [[ "$DELETE_INPUT" =~ ^[0-9]+$ ]]; then printf " Please Input a choice.\n" sleep 2; delete_payload; elif [[ "$DELETE_INPUT" == "0" ]]; then printf " Please Input a choice.\n" sleep 2; delete_payload; elif [[ "$DELETE_INPUT" -gt "$PLUS_QUIT" ]]; then printf " Please Input a choice.\n" sleep 2; delete_payload; elif [[ "$DELETE_INPUT" -le "$PLUS_QUIT" ]]; then printf " Deleting payload ${DIRS[$DELETE_INPUT]} from SharkJack. \n" rm -rf "$LIB_DIR/${DIRS[$DELETE_INPUT]}" cd "$START_DIR" sleep 2; sharklib_menu; else printf " Wrong Choice, going back to Previous Menu.\n" cd "$START_DIR" sleep 2; sharklib_menu; fi } function restore_payload() { LOAD_INPUT=NULL clear; SHARKLIB_TITLE=" Restore Payloads" header; cd "$LIB_DIR" DIR_CNT=$(ls "$LIB_DIR" | grep -v total | wc -l) declare -a DIRS i=1 for d in */; do DIRS[i++]="${d%/}" done if [ "$DIR_CNT" -lt "1" ]; then printf " There are no Payloads to Restore. \n\n" printf " Returning to Previous Menu.\n" sleep 2; sharklib_menu; fi printf " There are ${#DIRS[@]} Payloads in SharkLib:\n" for((i=1;i<=${#DIRS[@]};i++)); do printf " %2d. %-20s\n" "$i" "${DIRS[i]}" done PAYLOAD_TOTAL=${#DIRS[@]} PLUS_QUIT=$((PAYLOAD_TOTAL+1)) printf "\n" printf " %2d. %-20s\n" "$PLUS_QUIT" "Return to Previous Menu." printf "\n" printf " Please choose a Payload by Number: " read LOAD_INPUT printf "\n" if [[ "$LOAD_INPUT" == "$PLUS_QUIT" ]]; then printf " Returning to Previous Menu.\n" sleep 2; sharklib_menu; elif [[ "$LOAD_INPUT" == "" ]]; then printf " Please Input a choice.\n" sleep 2; restore_payload; elif ! [[ "$LOAD_INPUT" =~ ^[0-9]+$ ]]; then printf " Please Input a choice.\n" sleep 2; restore_payload; elif [[ "$LOAD_INPUT" == "0" ]]; then printf " Please Input a choice.\n" sleep 2; restore_payload; elif [[ "$LOAD_INPUT" -gt "$PLUS_QUIT" ]]; then printf " Please Input a choice.\n" sleep 2; restore_payload; elif [[ "$LOAD_INPUT" -le "$PLUS_QUIT" ]]; then printf " Loading payload ${DIRS[$LOAD_INPUT]} to SharkJack. \n" cp -rf "$LIB_DIR/${DIRS[$LOAD_INPUT]}/payload.sh" "$PAYLOAD_FILE" cd "$START_DIR" sleep 2; sharklib_menu; else printf " Wrong Choice, going back to Previous Menu.\n" cd "$START_DIR" sleep 2; sharklib_menu; fi } function cleanup_ctrl { echo -en "\n -> Caught SIGINT! \n" printf " -> Cleaning up and Exiting..\n\n" sync sleep 1; exit $? } function exit_sharklib() { printf " -> Cleaning up and Exiting..\n\n" sync sleep 1; exit 0; } function sharklib_menu() { clear; trap cleanup_ctrl SIGINT trap cleanup_ctrl SIGTERM MENU_INPUT=NULL if [ ! -d "$LIB_DIR" ]; then printf " -> Creating SharkLib Payload Library directory.\n" mkdir -p "$LIB_DIR" fi cd "$LIB_DIR" SHARKLIB_TITLE=" By REDD" header; printf " 1. Backup Payload to SharkLib\n" printf " 2. Restore Payload from SharkLib\n" printf " 3. Delete Payload from SharkLib\n" printf "\n" printf " 4. View Current Payload on SharkJack\n" printf "\n" printf " 5. Exit\n" printf "\n" printf " Select a Menu Item by # and press ENTER: " read MENU_INPUT printf "\n" if ! [[ "$MENU_INPUT" =~ ^[0-9]+$ ]]; then sharklib_menu; elif [[ "$MENU_INPUT" = "0" ]]; then sharklib_menu; elif [[ "$MENU_INPUT" = "1" ]]; then backup_payload; elif [[ "$MENU_INPUT" = "2" ]]; then restore_payload; elif [[ "$MENU_INPUT" = "3" ]]; then delete_payload; elif [[ "$MENU_INPUT" = "4" ]]; then view_payload; elif [[ "$MENU_INPUT" = "5" ]]; then exit_sharklib; elif [[ "$MENU_INPUT" -ge "6" ]]; then sharklib_menu; elif [[ "$MENU_INPUT" == "" ]]; then sharklib_menu; else sharklib_menu; fi } if [ "$1" == "--install" ]; then install_sharklib; exit 0; elif [ "$1" == "--remove" ]; then remove_sharklib; else install_sharklib; sharklib_menu; fi Suggestions are always welcome! Huge Thanks to Hak5 for the wonderful gear! REDD (Ar1k88)
  2. Sharkjack.ps1 This is a rewritten (Windows) PowerShell version of Hak5's "sharkjack.sh". Compliments to Hak5 for the Device and the original script. I only take credit for rewriting the script to support Windows. Please Note: SharkLib Options are DISABLED until Hak5 merges SharkLib into the GitHub. If you are having problems getting the file to run. See Post #3. (If you have multiple SharkJacks, type "clearssh" in menu to clear your "known hosts" SSH File of the SharkJack's Fingerprint. Then try to reconnect using SSH via option #5) sharkjack.ps1 # Title: SharkJack Helper Script (PowerShell) # Author: Hak5 (rewritten for Windows by REDD) # Version: 1.2 # Remove for Debugging purposes. $ErrorActionPreference = "SilentlyContinue" # Base Script Variables - DO NOT CHANGE Write-Host "Initializing... One Moment Please..." $console = $host.ui.rawui $console.backgroundcolor = "Black" $console.foregroundcolor = "Green" $colors = $host.privatedata $colors.verbosebackgroundcolor = "Yellow" $colors.verboseforegroundcolor = "Black" $colors.warningbackgroundcolor = "Red" $colors.warningforegroundcolor = "white" $colors.ErrorBackgroundColor = "DarkCyan" $colors.ErrorForegroundColor = "Yellow" $DIR = Convert-Path . # Script Variables $SHARKJACK_IP = "172.16.24.1" $REMOTE_PAYLOAD = "root@$SHARKJACK_IP`:/root/payload/payload.sh" $UPGRADE_FILE = 'https://downloads.hak5.org/api/devices/sharkjack/firmwares/1.1.0' $BASEFILENAME = "upgrade-1.1.0.bin" $FIRMWARE_SHA = "03638c7937a1718b6535116eac8b0a75f2a79054e61dc401af56b51da2044386" $PAYLOADDIR = $DIR+'\library' $MENU_SELECTION = 0 $CIRCLE = ([char]8226) Function Header_Ascii { Write-Host "" Write-Host " ########################################################" Write-Host "" Write-Host "" Write-Host " \_____)\_____ Shark Jack _____/(_____/" Write-Host " /--v____ __$CIRCLE< by Hak5 >$($CIRCLE)__ ____v--\" Write-Host " )/ \(" Write-Host "" Write-Host "" Write-Host " ########################################################" Write-Host " Windows Version by REDD" Write-Host "" } Function Initialize { $CONN_SUCC = 0 $LOOP = 0 while ($CONN_SUCC -eq 0) { $connection = Test-Connection "$SHARKJACK_IP" -Count 1 -Quiet If ($connection -eq $true) { Write-Host "SharkJack detected.." Start-Sleep -s 2 $CONN_SUCC = 1; } ElseIf ($connection -eq $false) { If ($LOOP -eq 0) { Write-Host -NoNewline "Please Connect the SharkJack in Arming Mode.." Start-Sleep -s 2 $LOOP = 1; } Else { Write-Host -NoNewline "." Start-Sleep -s 2 } } } } Function Download_Repo { Write-Host "Checking if Connection to Internet is possible with SharkJack connected." Write-Host "" Write-Host "Please Wait.." Write-Host "" $HTTP_Request = [System.Net.WebRequest]::Create('http://google.com') $HTTP_Response = $HTTP_Request.GetResponse() $HTTP_Status = [int]$HTTP_Response.StatusCode If ($HTTP_Status -eq 200) { Write-Host " -> Connection established!" $Connection_Check = 1 } Else { Write-Host " -> Connection Failed!" $Connection_Check = 0 } If ($HTTP_Response -eq $null) { } Else { $HTTP_Response.Close() } Write-Host "" if ( $Connection_Check -eq 1 ) { if (!(Test-Path $PAYLOADDIR)) { Write-Host "Downloading Payload Library from GitHub.. Please Wait." $WebClient = New-Object System.Net.WebClient $WebClient.DownloadFile("https://github.com/hak5/sharkjack-payloads/archive/master.zip","$DIR\master.zip") Write-Host "Extracting Payload Library.." Expand-Archive -LiteralPath $DIR\master.zip -DestinationPath $DIR Get-ChildItem -Path "$DIR\sharkjack-payloads-master" | Copy-Item -Force -Destination "$DIR" -Recurse -Container Get-ChildItem -Path "$DIR\sharkjack-payloads-master\payloads" | Copy-Item -Force -Destination "$DIR" -Recurse -Container Remove-Item $DIR\sharkjack-payloads-master -Force -Recurse -ErrorAction SilentlyContinue Remove-Item $DIR\payloads -Force -Recurse -ErrorAction SilentlyContinue Write-Host "Cleaning up Repo Files.." Remove-Item -path $DIR\master.zip -force Remove-Item -path $DIR\README.md -force Remove-Item -path $DIR\sharkjack.sh -force Write-Host "Finished." Start-Sleep -s 2 } Else { Write-Host "Payload Directory is already present in current Folder." Start-Sleep -s 2 } } Else { Write-Host " Disconnect the SharkJack from the PC OR Set your Internet to" Write-Host " the correct configurations, and try again." Start-Sleep -s 15 } } Function Copy_Payload { if (!(Test-Path $PAYLOADDIR)) { Write-Host "No Payload Library downloaded. Starting Downloading Process." Start-Sleep -s 2 Download_Repo } Initialize $MAINFOLDERS = @(Get-ChildItem $PAYLOADDIR | Select Name | Sort @{Expression={$_.name.length}} -Descending | Out-GridView -Title 'Choose a Directory' -PassThru | Select -ExpandProperty "Name") if (!($MAINFOLDERS)) { Write-Host "ERROR: Please Select a Folder."; Start-Sleep -s 2; Menu-Function } $PAYLOADSELECTDIR = @(Get-ChildItem $PAYLOADDIR\$MAINFOLDERS | Select Name | Sort @{Expression={$_.name.length}} -Descending | Out-GridView -Title 'Choose a Payload' -PassThru | Select -ExpandProperty "Name") if (!($PAYLOADSELECTDIR)) { Write-Host "ERROR: Please Select a Payload."; Start-Sleep -s 2; Menu-Function } $SELECTED_PAYLOAD = $PAYLOADDIR+'\'+$MAINFOLDERS+'\'+$PAYLOADSELECTDIR+'\payload.sh' Write-Host "Copying ->" Write-Host "Source Payload: $SELECTED_PAYLOAD" Write-Host "Destin Payload: $DIR\payload.sh" Write-Host "Remote Payload: $REMOTE_PAYLOAD" Write-Host "" Copy-Item "$SELECTED_PAYLOAD" -Destination "$DIR\payload.sh" Write-Host "Attempting to Push Payload to SharkJack.." scp "$DIR\payload.sh" "$REMOTE_PAYLOAD" Write-Host "Finished." Start-Sleep -s 2 Menu-Function } Function Copy_Dir_Payload { $Current_Payload = $DIR+'\payload.sh' if (!(Test-Path "$Current_Payload" -PathType Leaf)) { Write-Host "No $Current_Payload exists." Start-Sleep -s 7 } Else { Initialize Write-Host "Attempting to Push Payload to SharkJack.." scp "$DIR\payload.sh" "$REMOTE_PAYLOAD" Write-Host "Finished." Start-Sleep -s 2 Menu-Function } } Function Connect_SharkJack { Initialize Write-Host "Attempting to Connect (SSH) to the SharkJack.." ssh "root`@$SHARKJACK_IP" Write-Host "Done." Start-Sleep -s 2 Menu-Function } Function Clean_Known_Hosts { Write-Host "Clearing old SSH Keys for SharkJack. Please Wait.." Get-Content $env:userprofile\.ssh\known_hosts | select-string -pattern "$SHARKJACK_IP" -notmatch | Out-File $env:userprofile\.ssh\known_hosts.new Copy-Item "$env:userprofile\.ssh\known_hosts" -Destination "$env:userprofile\.ssh\known_hosts.bk" Remove-Item -path $env:userprofile\.ssh\known_hosts -force Copy-Item "$env:userprofile\.ssh\known_hosts.new" -Destination "$env:userprofile\.ssh\known_hosts" Remove-Item -path $env:userprofile\.ssh\known_hosts.new -force Write-Host "Removed old SSH Keys for SharkJack. Try to connect again via SSH." Start-Sleep -s 3 Menu-Function } Function Connect_SharkJack_Web { Initialize Write-Host "Attempting to Launch Browser to connect to SharkJack.." start "http://$SHARKJACK_IP/cgi-bin/status.sh" Menu-Function } Function Update_SharkJack { Write-Host "Checking if Connection to Internet is possible with SharkJack connected." Write-Host "" Write-Host "Please Wait.." Write-Host "" $HTTP_Request = [System.Net.WebRequest]::Create('http://google.com') $HTTP_Response = $HTTP_Request.GetResponse() $HTTP_Status = [int]$HTTP_Response.StatusCode If ($HTTP_Status -eq 200) { Write-Host " -> Connection established!" $Connection_Check = 1 } Else { Write-Host " -> Connection Failed!" $Connection_Check = 0 } If ($HTTP_Response -eq $null) { } Else { $HTTP_Response.Close() } If ( $Connection_Check -eq 1 ) { $FIRMWARE_FILE = $DIR+'\'+$BASEFILENAME Write-Host "Downloading Firmware from $UPGRADE_FILE" $WebClient = New-Object System.Net.WebClient $WebClient.DownloadFile("$UPGRADE_FILE","$FIRMWARE_FILE") Write-Host "Checking SHA256 of $FIRMWARE_FILE" $CHK_DOWNLOAD = (Get-FileHash -Path $FIRMWARE_FILE -Algorithm "SHA256" -ErrorAction Stop).Hash If ($CHK_DOWNLOAD -ne $FIRMWARE_SHA) { Write-Host "SHA265 DOES NOT MATCH! Deleting $BASEFILENAME" del "$FIRMWARE_FILE" Write-Host "Done. Please Retry again." Start-Sleep -s 5 Menu-Function } Else { Write-Host "SHA256 Matches! Continuing Upgrade.." Write-Host "" Write-Host "Attempting to start the Upgrade Process.." Write-Host "------------------------------------------------------" Write-Host "PLEASE ONLY DO THIS IF YOU KNOW WHAT VERSION YOUR" Write-Host "SHARKJACK IS ON." Write-Host "" $Confirm_Update = Read-Host "THIS WILL ERASE EVERYTHING ON THE SHARKJACK! ARE YOU SURE? (y/[N])" Switch ($Confirm_Update) { Y {Write-host "Confirmed!"; $Update_Confirm_Status = 1} N {Write-Host "Not Confirmed!"; $Update_Confirm_Status = 0} Default {Write-Host "No Input detected. Defaulting to NO."; $Update_Confirm_Status = 0} } If ( $Update_Confirm_Status -eq 1 ) { Initialize Write-Host "Wait 5-10 minutes as the Shark Jack flashes the firmware and reboots." Write-Host "DO NOT unplug the device from USB power during this process as doing so will render the device inoperable." Write-Host "" Write-Host "Pushing $BASEFILENAME to SharkJack." scp "$FIRMWARE_FILE" "root`@$SHARKJACK_IP`:/tmp/$BASEFILENAME" Write-Host "Initializing Upgrade.." ssh "root`@$SHARKJACK_IP" "sysupgrade -n /tmp/$BASEFILENAME" Write-Host "Upgrade started.. Waiting 30s.." Start-Sleep -s 30 Write-Host "Wait for SharkJack to start in Arming Mode.." Write-Host "" Write-Host "Once SharkJack has shut itself down.. It will reboot." Start-Sleep -s 2; Initialize } Else { Write-Host "Returning to Menu." Start-Sleep -s 2 Menu-Function } } } Else { Write-Host " Disconnect the SharkJack from the PC OR Set your Internet to" Write-Host " the correct configurations, and try again." Start-Sleep -s 15 } } Function Cleanup { if (Test-Path $PAYLOADDIR) { Write-Host "Found $PAYLOADDIR.. Removing.." Remove-Item $PAYLOADDIR -Force -Recurse -ErrorAction SilentlyContinue } if (Test-Path $DIR\sharkjack.sh) { Write-Host "Found sharkjack.sh.. Removing.." Remove-Item $DIR\sharkjack.sh -Force } if (Test-Path $DIR\$BASEFILENAME) { Write-Host "Found $BASEFILENAME.. Removing.." Remove-Item $DIR\$BASEFILENAME -Force } if (Test-Path $DIR\payload.sh) { Write-Host "Found payload.sh.. Removing.." Remove-Item $DIR\payload.sh -Force } Write-Host "Everything cleaned up." Start-Sleep -s 2 Menu-Function } Function Disabled_Func { Write-Host "" Write-Host "ERROR: Sorry the Selection you made has been disabled." Write-Host "ERROR: Please contact REDD or Hak5 regarding this message." Write-Host "" Start-Sleep -s 5 Menu-Function } Function Menu-Function { $MENU_SELECTION = 0 clear Header_Ascii $type=Read-Host " 1 - [D]ownload Payload Library from GitHub 2 - Install SharkLib to Shark[J]ack 3 - Remove Shark[L]ib from SharkJack 4 - [C]opy Payload to SharkJack (Interactive) 5 - Copy [P]ayload from SharkJack.ps1 Directory 6 - Connect to SharkJack [S]SH 7 - Connect to SharkJack [W]eb UI (1.0.1+) 8 - [U]pdate SharkJack 9 - [R]emove ALL Downloaded Files 0 - [E]xit Please select a # OR [L]etter and press ENTER" Switch ($type){ 1 {$MENU_SELECTION = 1; Download_Repo} D {$MENU_SELECTION = 1; Download_Repo} 2 {$MENU_SELECTION = 1; Disabled_Func} 3 {$MENU_SELECTION = 1; Disabled_Func} 4 {$MENU_SELECTION = 1; Copy_Payload} C {$MENU_SELECTION = 1; Copy_Payload} 5 {$MENU_SELECTION = 1; Copy_Dir_Payload} P {$MENU_SELECTION = 1; Copy_Dir_Payload} 6 {$MENU_SELECTION = 1; Connect_SharkJack} S {$MENU_SELECTION = 1; Connect_SharkJack} 7 {$MENU_SELECTION = 1; Connect_SharkJack_Web} W {$MENU_SELECTION = 1; Connect_SharkJack_Web} 8 {$MENU_SELECTION = 1; Update_SharkJack} U {$MENU_SELECTION = 1; Update_SharkJack} 9 {$MENU_SELECTION = 1; Cleanup} R {$MENU_SELECTION = 1; Cleanup} clearssh { $MENU_SELECTION = 1; Clean_Known_Hosts} E { Write-Host "Exiting.. Please Wait."; Exit } 0 { Write-Host "Exiting.. Please Wait."; Exit } } } Initialize while ($MENU_SELECTION -eq 0) { Menu-Function }
  3. SharkHelper This Tool completes the Hak5 "SharkJack.sh" script. This adds small features that the original Helper Script is missing - While also making it easier to setup/re-setup the SharkJack itself. Linux version to be released soon. Any features or requests are welcome. The Menu: O=====================================O | | | SharkHelper Menu | | | O=====================================O 1. Install SharkLib 2. Remove SharkLib 3. Install Default Nmap Scan 4. Install Internet Tester 5. Install Internet Tester C2 6. View Current Payload 7. Install C2 Config File (device.config) 0. Exit SharkHelper Select # from Menu and Press ENTER: The Code: @echo off REM REM Name: SharkHelper (Windows 10) REM Version: 1.2 REM Author: REDD of PL REM Target OS: Windows 10 REM Description: This script is to help make setting up the SharkJack EVEN easier REM than Hak5's Script. I don't know how much easier it can get. REM SET "SHARK_IP=172.16.24.1" cls echo Please put SharkJack into Arming Mode and echo connect it to the Ethernet Port on your PC. echo. echo. echo Waiting.. echo. :loop ping -n 1 %SHARK_IP% |find "TTL=" >NUL 2>NUL || goto :loop echo Connected. timeout /t 2 /NOBREAK >NUL :SHARKHELPER_MENU cls echo. echo. echo O=====================================O echo ^| ^| echo ^| SharkHelper Menu ^| echo ^| ^| echo O=====================================O echo. echo 1. Install SharkLib echo 2. Remove SharkLib echo 3. Install Default Nmap Scan echo 4. Install Internet Tester echo 5. Install Internet Tester C2 echo. echo 6. View Current Payload echo. echo 7. Install C2 Config File (device.config) echo. echo 0. Exit SharkHelper echo. echo. SET /P MENU1=Select # from Menu and Press ENTER: IF "%MENU1%"=="1" GOTO INSTALL_SHARKLIB IF "%MENU1%"=="2" GOTO REMOVE_SHARKLIB IF "%MENU1%"=="3" GOTO DEFAULT_NMAP IF "%MENU1%"=="4" GOTO INSTALL_INTERNET_TESTER IF "%MENU1%"=="5" GOTO INSTALL_C2_INTERNET_TESTER IF "%MENU1%"=="6" GOTO VIEW_PAYLOAD IF "%MENU1%"=="7" GOTO INSTALL_C2_CONFIG IF /I "%MENU1%"=="q" GOTO EOF IF /I "%MENU1%"=="e" GOTO EOF IF /I "%MENU1%"=="quit" GOTO EOF IF /I "%MENU1%"=="exit" GOTO EOF IF /I "%MENU1%"=="0" GOTO EOF GOTO SHARKHELPER_MENU :INSTALL_SHARKLIB cls IF NOT EXIST "%CD%\sharklib.sh" ( echo Downloading SharkLib to local folder. powershell -Command "(New-Object Net.WebClient).DownloadFile('https://git.private-locker.com/project/sharklib/raw/master/sharklib.sh', 'sharklib.sh')" ) IF EXIST "%CD%\sharklib.sh" ( echo SharkLib already exists in current directory. Using that copy. ) echo. echo. echo Pushing sharklib.sh to SharkJack at %SHARK_IP% echo Connecting to the SharkJack.. echo. echo (Input password: hak5shark OR Password you have already set.) scp %CD%\sharklib.sh root@%SHARK_IP%:/root/sharklib.sh echo. echo. echo Executing SharkLib, Exit SharkLib to return to this Menu. echo. ssh root@%SHARK_IP% "chmod +x sharklib.sh;bash /root/sharklib.sh --install;exit" echo. echo Finished. Returning to SharkHelper Menu. pause GOTO SHARKHELPER_MENU :REMOVE_SHARKLIB cls echo. echo. echo Attempting to remove SharkLib from the SharkJack. echo Connecting to the SharkJack.. echo. echo. echo (Input password: hak5shark OR Password you have already set.) ssh root@%SHARK_IP% "sharklib --remove;exit" echo. echo Finished. Returning to SharkHelper Menu. pause GOTO SHARKHELPER_MENU :DEFAULT_NMAP cls IF NOT EXIST "%CD%\payload_default.sh" ( echo Downloading SharkLib to local folder. powershell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/hak5/sharkjack-payloads/master/payloads/library/recon/Sample-Nmap-Payload/payload.sh', 'payload_default.sh')" ) IF EXIST "%CD%\payload_default.sh" ( echo SharkLib already exists in current directory. Using that copy. ) echo. echo. echo Pushing payload_default.sh to SharkJack at %SHARK_IP% echo Connecting to the SharkJack.. echo. echo (Input password: hak5shark OR Password you have already set.) scp %CD%\payload_default.sh root@%SHARK_IP%:/root/payload/payload.sh echo. echo Finished. Returning to SharkHelper Menu. pause GOTO SHARKHELPER_MENU :INSTALL_INTERNET_TESTER cls IF NOT EXIST "%CD%\payload_Internet_Tester.sh" ( echo Downloading Internet Tester to local folder. powershell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/hak5/sharkjack-payloads/master/payloads/library/util/internet-access-tester/payload.sh', 'payload_Internet_Tester.sh')" ) IF EXIST "%CD%\payload_Internet_Tester.sh" ( echo Internet Tester Payload already exists in current directory. Using that copy. ) echo. echo. echo Pushing payload_Internet_Tester.sh to SharkJack at %SHARK_IP% echo Connecting to the SharkJack.. echo. echo (Input password: hak5shark OR Password you have already set.) scp %CD%\payload_Internet_Tester.sh root@%SHARK_IP%:/root/payload/payload.sh echo. echo Finished. Returning to SharkHelper Menu. pause GOTO SHARKHELPER_MENU :INSTALL_C2_INTERNET_TESTER cls IF NOT EXIST "%CD%\payload_C2_Internet_Tester.sh" ( echo Downloading Internet Tester to local folder. powershell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/hak5/sharkjack-payloads/master/payloads/library/util/internet-access-tester/payload.sh', 'payload_C2_Internet_Tester.sh')" echo C2CONNECT >> %CD%\payload_C2_Internet_Tester.sh ) IF EXIST "%CD%\payload_C2_Internet_Tester.sh" ( echo Internet Tester Payload already exists in current directory. Using that copy. ) echo. echo. echo Pushing payload_Internet_Tester.sh to SharkJack at %SHARK_IP% echo Connecting to the SharkJack.. echo. echo (Input password: hak5shark OR Password you have already set.) scp %CD%\payload_C2_Internet_Tester.sh root@%SHARK_IP%:/root/payload/payload.sh echo. echo Finished. Returning to SharkHelper Menu. pause GOTO SHARKHELPER_MENU :INSTALL_C2_CONFIG cls IF NOT EXIST "%CD%\device.config" ( echo. echo Please make sure to put your 'device.config' file in: echo -^> %CD% echo. echo. pause GOTO SHARKHELPER_MENU ) IF EXIST "%CD%\device.config" ( echo. echo Continuing.. device.config file found. echo. echo. echo Pushing device.config to SharkJack at %SHARK_IP% echo Connecting to the SharkJack.. echo. echo (Input password: hak5shark OR Password you have already set.) scp %CD%\device.config root@%SHARK_IP%:/etc/device.confg echo. echo Finished. Returning to SharkHelper Menu. pause GOTO SHARKHELPER_MENU ) :VIEW_PAYLOAD cls echo Connecting to the SharkJack with default credentials. (root:hak5shark) echo. echo. echo (Input password: hak5shark OR Password you have already set.) echo. ssh root@%SHARK_IP% "cat /root/payload/payload.sh;exit" echo. pause GOTO SHARKHELPER_MENU :EOF echo Cleaning Up.. IF EXIST "%CD%\payload_C2_Internet_Tester.sh" del /f %CD%\payload_C2_Internet_Tester.sh IF EXIST "%CD%\payload_Internet_Tester.sh" del /f %CD%\payload_Internet_Tester.sh IF EXIST "%CD%\payload_default.sh" del /f %CD%\payload_default.sh IF EXIST "%CD%\sharklib.sh" del /f %CD%\sharklib.sh EXIT /B
  4. Hoi hoi! Could we, er, perhaps have Twisted as a tool to use with the Bunny? Could be fun turning the Bunny into a bunch of different servers. I'm specifically looking at using the Bunny as a DNS server for DNS attacks. But you know, why not use it as a chat server as well. Maybe a mail server too while we're at it. Oh, and there's a web server inbuilt too.. Yea. I wants it. But can't work out how to get it on the Bunny! (Tarball not cutting it, pip errors hard..)
  5. WabbitWeb The ultimate payload-handling tool! Hey guys, I finally got around to uploading my first payload, after many weeks of tinkering with it - trying to get it to work. So, what did I spend hours upon days upon multiple weeks making? This. A tool that focuses mainly on handling payloads. With this tool, you have to know that payloads are referred to as Letters, as the payloads are saved as letters (A, B and C). Target: Windows 7, 8, 8.1, 10 Dependencies: Impacket - For SMB server - WabbitWeb will still work without Impacket, but won't start the SMB server Directory 'ww' - Holds everything, basically Features: BashBunny-hosted python webserver - Handles all of the events, commands and pages! - Beautiful, user-friendly web interface that scales with your screen! File Command System (FCS - makes it sound a bit fancier) - Uses the BashBunny's file system to handle commands and functions! - If there is a file called COMMAND.sh in the 'ww' directory, it will instantly source and delete it! - Allows WabbitWeb to have a CLI interface in the website itself! Payload Launcher - Website app (handled by FCS) - Launch a Letter you just created using the Payload Editor! Payload Editor - Website app (handled by FCS) - Create a Letter, a payload saved to a letter (A, B or C) that is runnable almost instantly! - Doesn't handle existing payloads, only allows you to create new ones (future feature, maybe?) Command Line - Pass commands straight to the Bunny! - Logs and saves all commands to WabbitWeb! SMB Launcher - Website app (handled by FCS) - Launches a SMB server at WabbitWeb's payload folder - giving you access to all it's code DURING RUNTIME! - Automagically starts up a Windows Explorer window pointed straight at the SMB server! - Edit your Letters in your own editor (e.g. Notepad++) or copy your own payload to the folder, then use the Payload Launcher to run them! Shutdown (yes..this is a feature!) - Website app (handled by FCS) - Shuts down WabbitWeb (...what did you expect?) - Uses ATTACKMODE OFF to hide, thanks to firmware 1.3! Known bugs: Payload Editor - LED commands return a usage error - Sleep functions don't register - Swapping ATTACKMODEs isn't wise (doable, but it doesn't like it too much) Github: Link to Github page I will be updating this quite a bit in the background, so stay tuned if you are interested in keeping this up-to-date. I will only upload versions that are working properly, so don't worry if you think that its main features (Letters - Payload Launcher and Payload Editor) might not be working and therefore not update. Currently the files are in their own Github (master), so if anyone could give me a rundown of how to get Darren to put them in the payloads folder, shout at me in the comments or PM me. Usage: To use WabbitWeb, just copy the contents of the Github repo to a switch, plug the Bunny in with that switch ready and let it fly. Once it is flashing blue, you can open up Chrome (preferably Chrome, but most web browsers should work fine) and go to: 172.16.64.1:80 which will take you to the WabbitWeb's home page! From there, you can create payloads (known as Letters), launch the Letters you make, start up an SMB server so you can edit the Letters firsthand and edit the webpages if you really want..or just see the code as it is running. Okay, that's cool. How do I edit a Letter from the SMB server's folder? All you need to do is go to the 'scripts' folder and you should see 3 script files (among a few other files) there, la.sh, lb.sh and lc.sh. They are your A, B and C letters. If you create a payload using the Payload Editor, you will see the scripts update. If you create a script using Notepad++ or another program like that (e.g. Notepad - ew..) and save it as one of those letters, you can launch it using the Payload Launcher! Keep in mind that any output you make goes straight to a log file in the usual logs folder, so don't bother manually making a log file unless you want it somewhere specific. Screenshots: Link to Imgur post Updates: Updated to 1.0.1 on 5/05/17 Updated to 1.0.2 on 5/05/17 Updated to 1.0.3 on 8/05/17 Updated to 1.0.4 on 10/05/17 Updated to 1.0.5 on 10/05/17 Updated to 1.0.6 on 11/05/17 Updated to 1.1.0 on 22/05/17 Updated to 1.1.1 on 23/05/17 Feel free to give me lots of constructive feedback! Also, if you can think of anything that may fix any of the bugs above, feel free to comment/PM me! If you find any more bugs, comment below - I'll check this post most days. This payload is open-source and editable as you like, but please do not post a copy of this as your own work, as it isn't nice and it isn't your own work!
×
×
  • Create New...