Defcon 17 CTF Qualifier Results (2009)

Filed under: Uncategorized — admin at 11:36 am on Monday, June 8, 2009

Final results for the 2009 (Defcon 17) CTF Qualifier is as follows:

1. sk3wlm4st3r (5400)
2. VedaGodz (5000)
3. Sexy Pwndas (5000)
4. PLUS (4500)
5. Shellphish (4500)
6. Song of Freedom (4400)
7. lollerskaterz dropping from roflcopters (4300)
8. Underminers (4300)
9. Routards (4200)
alt. WOWHACKER (3800)

sk3wlm4st3r are rumored to be last years CTF champion, School of Root. This means that WOWHACKER would be team 10 at CTF.

528 “teams” signed up for quals, and 225 “teams” submitted answers.
Congratulations to everyone, and good luck at Defcon!

Batch Script to reboot cable modem

Filed under: Uncategorized — admin at 4:30 pm on Thursday, February 12, 2009

My Comcast cable modem keeps dropping internet connectivity, so I hacked together a script to monitor my internet connection and reboot the modem when needed.
Hopefully this will solve the problem until Comcast can replace the modem or fix their problems.


REM This script checks to see if I am online, if not, it reboots the cable modem. If it cannot reach the cable modem, it resets the router and then the cable modem.
REM if error code is 0 it pinged successfully.
REM if error code is 1, then there was an error.

:Start
echo at Start
sleep 30

ping -n 1 www.google.com
if %ERRORLEVEL%== 1 goto :ping2
goto :Start

:ping2
sleep 2
ping -n 1 www.yahoo.com
if %ERRORLEVEL%== 1 goto :ping3
goto :Start

:ping3
ping -n 1 www.myspace.com
if %ERRORLEVEL%== 1 goto :ping4
goto :Start

:ping4
ping -n 1 www.live.com
if %ERRORLEVEL%== 1 goto :logerror
goto :Start

:logerror
echo %date% %time% >> %COMPUTERNAME%-internetdown.txt

:recovery
ping -n 1 192.168.100.1
if %ERRORLEVEL%== 1 goto :resetrouter
goto :rebootmodem

:resetrouter
plink -i c:\temp\wheatonrouterkey.ppk -batch -ssh -l root 10.5.20.1
reboot

sleep 90
goto :recovery2

:recovery2
ping -n 1 192.168.100.1
if %ERRORLEVEL%== 1 goto :recovery2

ping -n 1 192.168.100.1
if %ERRORLEVEL%== 1 goto :recovery2

ping -n 1 192.168.100.1
if %ERRORLEVEL%== 1 goto :recovery2

ping -n 1 192.168.100.1
if %ERRORLEVEL%== 1 goto :recovery2

:rebootmodem
sleep 20
wget -g -w 1 -t 0 --retry-connrefused http://192.168.100.1/configdata.html --post-data="FREQ_PLAN=NORTH_AMERICA&US_CHANNEL_ID=6&FREQUENCY_MHZ=555000000&DHCP_SERVER=YES&BUTTON_INPUT=Restart+Cable+Modem"
sleep 60
ping -n 1 www.google.com
if %ERRORLEVEL%== 1 echo %date% %time% still not online >> %COMPUTERNAME%-internetdown.txt
ping -n 1 www.google.com
if %ERRORLEVEL%== 0 echo %date% %time% phew online >> %COMPUTERNAME%-internetdown.txt
ping -n 1 www.google.com
if %ERRORLEVEL%== 0 goto :start
sleep 60
ping -n 1 www.google.com
if %ERRORLEVEL%== 1 echo %date% %time% still not online >> %COMPUTERNAME%-internetdown.txt
ping -n 1 www.google.com
if %ERRORLEVEL%== 0 echo %date% %time% phew online >> %COMPUTERNAME%-internetdown.txt
ping -n 1 www.google.com
if %ERRORLEVEL%== 0 goto :start
sleep 60
ping -n 1 www.google.com
if %ERRORLEVEL%== 1 echo %date% %time% still not online >> %COMPUTERNAME%-internetdown.txt
ping -n 1 www.google.com
if %ERRORLEVEL%== 0 echo %date% %time% phew online >> %COMPUTERNAME%-internetdown.txt
ping -n 1 www.google.com
if %ERRORLEVEL%== 0 goto :start
sleep 60
ping -n 1 www.google.com
if %ERRORLEVEL%== 1 echo %date% %time% still not online >> %COMPUTERNAME%-internetdown.txt
ping -n 1 www.google.com
if %ERRORLEVEL%== 0 echo %date% %time% phew online >> %COMPUTERNAME%-internetdown.txt
ping -n 1 www.google.com
if %ERRORLEVEL%== 0 goto :start
sleep 60
ping -n 1 www.google.com
if %ERRORLEVEL%== 1 echo %date% %time% still not online >> %COMPUTERNAME%-internetdown.txt
ping -n 1 www.google.com
if %ERRORLEVEL%== 0 echo %date% %time% phew online >> %COMPUTERNAME%-internetdown.txt
ping -n 1 www.google.com
if %ERRORLEVEL%== 0 goto :start
sleep 60
ping -n 1 www.google.com
if %ERRORLEVEL%== 1 echo %date% %time% still not online >> %COMPUTERNAME%-internetdown.txt
ping -n 1 www.google.com
if %ERRORLEVEL%== 0 echo %date% %time% phew online >> %COMPUTERNAME%-internetdown.txt
ping -n 1 www.google.com
if %ERRORLEVEL%== 0 goto :start
sleep 60
ping -n 1 www.google.com
if %ERRORLEVEL%== 1 echo %date% %time% still not online >> %COMPUTERNAME%-internetdown.txt
ping -n 1 www.google.com
if %ERRORLEVEL%== 0 echo %date% %time% phew online >> %COMPUTERNAME%-internetdown.txt
ping -n 1 www.google.com
if %ERRORLEVEL%== 0 goto :start
sleep 60
ping -n 1 www.google.com
if %ERRORLEVEL%== 1 echo %date% %time% still not online >> %COMPUTERNAME%-internetdown.txt
ping -n 1 www.google.com
if %ERRORLEVEL%== 0 echo %date% %time% phew online >> %COMPUTERNAME%-internetdown.txt
ping -n 1 www.google.com
if %ERRORLEVEL%== 0 goto :start

goto :Start

Here’s how this script works:

1) Ping a series of websites to check if we have internet access. This way if one particular website is down, or is dropping pings, we still can connect.

2) If we still do not have internet access, log the date/time to a logfile.

3) Check if we can access the cable modem.

4) If we can not, reboot my router. This is done by sshing into my Openwrt router and rebooting it.

5) Otherwise reboot the cable modem.
This is done by using wget to post to a form.

6) Keep checking to see if we are online, write that information to a log file, then restart.

It’s a quick hack of a script, but it demonstrates how to use a batch file to see if a website is online.

Batch script to delete all empty subdirectories.

Filed under: Uncategorized — admin at 2:16 pm on Thursday, May 15, 2008

I needed a script to delete all empty subdirectories, but the examples I found failed with directories with spaces in them, or would not let me pass the directory name to the script.

This bat file will do the trick.


@echo off
for /f "delims=" %%i in ('dir "%~f1" /ad /b /s ^| sort /R') do rd "%%i" 1>NUL 2>&1

The batch file will list all directories, in reverse order, and then attempt to delete each one.
rd will only delete empty directories.
The delims parameter stops spaces from being used as a delimiter.
%~f1 lets you pass a directory name to the script.

We use IO redirection at the end of the script to prevent warnings from being displayed on screen.
1>NUL 2>&1
This code says to redirect standard output (handle 1) to NUL, and also take sderr (handle 2) and redirect that to handle 1.

Thanks to Raymond Chen for the original code.

Sguil 0.7.0 released

Filed under: Uncategorized — admin at 9:58 am on Wednesday, March 26, 2008

As a former MSSP (managed security service provider) security analyst, I’m always on the lookout for tools to better help me watch and analyze network traffic. Sguil provides for an analyst centric toolkit for monitoring network traffic, and has proved to be very useful in the past.

Version 0.7.0 was just released, and I encourage people to check it out.

Sguil 0.7.0

Digital Books, the Easy Way

Filed under: College — admin at 12:53 pm on Thursday, March 9, 2006

Especially since I bought my Tablet PC, I’ve always wanted digital copies of my books. Unfortunately, even with a decent scanner, scanning books takes an extremely long time. However, with modern day digital cameras, we can vastly reduce scan time by using a camera to photograph our book.

(Read on …)

Polarity

Filed under: Uncategorized — admin at 8:47 pm on Thursday, January 12, 2006

Just recived this sweet board game Polarity…and managed to make a double leaner :)

108

On Paranoia

Filed under: Uncategorized — admin at 4:46 pm on Thursday, January 12, 2006

When browsing slashdot, I came across an interesting comment:

Bill Gates from Triumph of the nerds:

Success is a menace — it fools smart people into thinking they can’t lose.

That is absolutely the perfect quote to describe why Microsoft is the unbelivably paranoid company that it is. Bill always thinks Microsoft might lose and does any and everything (legal or not) to make sure that they don’t.

I think this summarizes an interesting viewpoint on paranoia; namely that paranoia in and of itself doesn’t have to be a bad thing. It’s an extended version of what one might deem a disaster recovery plan, but an ongoing continous plan.

Paranoia as a mindset especially in the InfoSecurity world can be a very good thing, it’s merely a way of looking at the world that continously analyzes it for potential failings, and asks the question – How can I mitigate this risk?

lorem ipsum

Filed under: Uncategorized — admin at 4:38 pm on Monday, October 24, 2005

lorem ipsum is standard dummy text…been used for a while.

Work In Progress

Filed under: Uncategorized — admin at 12:43 pm on Saturday, October 22, 2005

I’m currently working on setting up a combination wordpress/gallery2 blog/photogallery.

Should be fun:)

Jolly