InfoSecREDD Posted January 9, 2020 Share Posted January 9, 2020 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.config 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 Link to comment Share on other sites More sharing options...
InfoSecREDD Posted January 9, 2020 Author Share Posted January 9, 2020 Changelog:1.2 - Add's "C2 Config File" option. 1.1 - Fixes small bugs. Adds "View Current Payload" option. Adds "Default Nmap Payload" option. 1.0 - Initial release Link to comment Share on other sites More sharing options...
McFly Posted January 9, 2020 Share Posted January 9, 2020 great. thank you very much. silly question: how do I put the code into a script and start the script on win10? Link to comment Share on other sites More sharing options...
InfoSecREDD Posted January 9, 2020 Author Share Posted January 9, 2020 30 minutes ago, McFly said: great. thank you very much. silly question: how do I put the code into a script and start the script on win10? The Source can be downloaded here..https://git.private-locker.com/project/sharkhelper/blob/master/SharkHelper.cmd Direct Download Link: (You'll need to rename the file to SharkHelper.cmd instead of SharkHelper.txt)https://git.private-locker.com/project/sharkhelper/raw/master/SharkHelper.cmd?inline=false Or you can copy the code above, Copy/Paste it into Notepad. "Save As.." file as "SharkHelper.cmd". Link to comment Share on other sites More sharing options...
InfoSecREDD Posted January 14, 2020 Author Share Posted January 14, 2020 Bugs - SSH keys from prior installs will throw errors. Will fix in next version. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.