Jump to content
REDD

[TOOL] SharkHelper (Windows)

Recommended Posts

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

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

great. thank you very much.

 

silly question:

how do I put the code into a script and start the script on win10?

Share this post


Link to post
Share on other sites
Posted (edited)
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".
 

Edited by REDD
  • Like 1

Share this post


Link to post
Share on other sites

Bugs -

  • SSH keys from prior installs will throw errors. Will fix in next version.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...