Jump to content

Switchblade/hacksaw addon


Masterpyro

Recommended Posts

Would anyone be interested in an addon to the switchblade that shows all ports and services running? i have this finished but i will upload it only if people are interested.

Edit:

A new payload for the USB switchblade/Hacksaw that will scan the ports of the local computer and dump everything in the file theopenports%computername%_%date%_%time%.txt. I use PortQryV2 for this mod of the switchblade which creates the dump file with the above name and at the bottem of the dump file I added an explanation of the file name. Currently it is its own payload and is separate from the swithcblade/hacksaw but if time permits this week I will have a version that adds the data to the dump file created by the switchblade payload.

The package below contains PortQry and the test.bat that will create the dump file.

http://www.hak5.org/packages/files/Portscan.rar

@echo off 

@if not exist OpenPorts md OpenPorts >nul



cd Files



portqry -local -l OpenPorts%computername%_%date:~4,2%_%date:~7,2%_%time:~0,2%_%time:~3,2%.txt



echo. >> C:OpenPorts%computername%_%date:~4,2%_%date:~7,2%_%time:~0,2%_%time:~3,2%.txt

echo. >> C:OpenPorts%computername%_%date:~4,2%_%date:~7,2%_%time:~0,2%_%time:~3,2%.txt

echo Filename is: computername_month_day_hour_minute >> C:OpenPorts%computername%_%date:~4,2%_%date:~7,2%_%time:~0,2%_%time:~3,2%.txt



:End

Thanks goes to Brennan for the idea and multiple tests.

P.S. I know there is another way to do this but i think PortQry gives more information about the target. I also suggest using the code posted here because windows had some problems with naming the dump file in the zipped package.

Edit2: So far i have not been able to test this with my own flash drive so im not exactly sure if it is 100% invisible. The way it works now you can see it running Portqry but it takes less than a second.

Link to comment
Share on other sites

I did look at the alternatives for this but this is really my first atempt with batch files that do more than open the command prompt so PortQry helped by having the log file feature built in.

I will add it to the Packages page. Would this NEED added to the switchblade/hacksaw batch file if one were to use this or can the custom iso handel running two different batch files?

Link to comment
Share on other sites

A suggestion I didn't think of b4 is Change the C: to %systemdrive% b/c not everyone has the same drive

here it is moded below

@echo off 

@if not exist OpenPorts md OpenPorts >nul 



cd Files 



portqry -local -l OpenPorts%computername%_%date:~4,2%_%date:~7,2%_%time:~0,2%_%time:~3,2%.txt 



echo. >> %systemdrive%OpenPorts%computername%_%date:~4,2%_%date:~7,2%_%time:~0,2%_%time:~3,2%.txt 

echo. >> 5systemdrive%OpenPorts%computername%_%date:~4,2%_%date:~7,2%_%time:~0,2%_%time:~3,2%.txt 

echo Filename is: computername_month_day_hour_minute >> %systemdrive%OpenPorts%computername%_%date:~4,2%_%date:~7,2%_%time:~0,2%_%time:~3,2%.txt 



:End

Link to comment
Share on other sites

Yeah... I want it to record to the thumbdrive, yet it doesn't seem to want to...

Code: (Keep in mind I have no idea what I'm doing.)

@echo off

@if not exist WIPdump md WIPdump >nul

@if not exist WIPdump%computername% md WIPdump%computername% >nul

cd *WIPCMDFiles

portqry -local -l *WIPCMDDump%computername%computername%_%date:~4,2%_%date:~7,2%_%time:~0,2%_%time:~3,2%.txt

echo. >> *WIPCMDDump%computername%computername%_%date:~4,2%_%date:~7,2%_%time:~0,2%_%time:~3,2%.txt

echo. >> *WIPCMDDump%computername%computername%_%date:~4,2%_%date:~7,2%_%time:~0,2%_%time:~3,2%.txt

echo Filename is: computername_month_day_hour_minute >> *WIPCMDDump%computername%computername%_%date:~4,2%_%date:~7,2%_%time:~0,2%_%time:~3,2%.txt

:End

It makes the right folder, but there is nothing in it. Whats wrong?

Link to comment
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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...