Masterpyro Posted October 19, 2006 Share Posted October 19, 2006 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. Quote Link to comment Share on other sites More sharing options...
Jester Posted October 19, 2006 Share Posted October 19, 2006 sounds interesting enough upload it. Thanks for the work 8) Quote Link to comment Share on other sites More sharing options...
Masterpyro Posted October 19, 2006 Author Share Posted October 19, 2006 ok I am at school now so when i get home in 2 hours i will upload it and make an edit to this topic Quote Link to comment Share on other sites More sharing options...
DLSS Posted October 19, 2006 Share Posted October 19, 2006 kwl i'm aw8ing it ... Quote Link to comment Share on other sites More sharing options...
Darren Kitchen Posted October 19, 2006 Share Posted October 19, 2006 Sounds perfect for the packages page: http://www.hak5.org/wiki/Switchblade_Packages Quote Link to comment Share on other sites More sharing options...
spektormax Posted October 19, 2006 Share Posted October 19, 2006 the alternitive is using windows built in netstat or sysinternal's tcpviewcon Quote Link to comment Share on other sites More sharing options...
CaveMan Posted October 19, 2006 Share Posted October 19, 2006 tasklist would do it wouldn't it? Quote Link to comment Share on other sites More sharing options...
Masterpyro Posted October 20, 2006 Author Share Posted October 20, 2006 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? Quote Link to comment Share on other sites More sharing options...
spektormax Posted October 20, 2006 Share Posted October 20, 2006 well the page on the wiki is custumary to be all 1 batch, because its kiinda waht it looks like, butyou could call a batch file from a batch file Quote Link to comment Share on other sites More sharing options...
Brennan Posted October 27, 2006 Share Posted October 27, 2006 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 Quote Link to comment Share on other sites More sharing options...
Brennan Posted October 27, 2006 Share Posted October 27, 2006 Also I have a version that I was working on and dosen't require anything else but a windows machine Quote Link to comment Share on other sites More sharing options...
Moo Posted October 27, 2006 Share Posted October 27, 2006 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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.