Header
1 results were found... happy reading.

Tue, 1 Jan 2008

vbscript bruteforcing
@

When we first wrote the vbscripting bruteforcer i thought it was marginally cute and a real last shot type of tool. In the past 2 months its saved our ass twice so i thought id post it again..

The situation.. Uninstalling Pointsec from our machines.. the install needs 2 admin passwords (spadmin1 && spadmin2).

The 2 guys who managed the rollout seem to recall that the passwords were Aaaaaa69Bbbb69Ccccccc (or some variation of it) for spadmin1 and Xxxxxxx69Yyyyyy69Zzzzzzz (or some variation of it). (variation could be uppercase, lowercase, 68 instead of 69, camelcaps) all of this in an unpredictable permutation.. ie.. cld be aaaaaa69bbbb69ccccc && Xxxx68Yyyy68Zzzz.

Clearly this is perfect for automation.. and perfect for my lame vbs scripting trick..

So.. i mangled the ffg script:

-snip-

‘Quick and Dirty .vbs bruteforcer ‘haroon@sensepost.com

Dim objFSO, objTS, s, aFile Set objFSO = CreateObject(”Scripting.FileSystemObject”) Set objTS = objFSO.OpenTextFile(”words.txt”)

‘Now, read the contents of the file into a string s = objTS.ReadAll ‘Now, use split to load the contents of the file into an array aFile = split(s, vbCrLf) bFile = aFile

Msgbox “Passwords Loaded..”,,”Dirty Script”

set WshShell = CreateObject(”WScript.Shell”)

For Each pass in aFile For Each pass2 in bFile Msgbox “pass1 = ” & pass & vbCRLF & “pass2 = ” & pass2

‘Bring the application to the foreground WshShell.AppActivate “InstallShield Wizard - Pointsec Uninstallation” WScript.Sleep 200

While WshShell.AppActivate(”InstallShield Wizard - Pointsec Uninstallation”) = FALSE wscript.sleep 1000 Wend

’send tab WshShell.SendKeys “{TAB}” WshShell.SendKeys pass WshShell.SendKeys “{TAB}” WshShell.SendKeys “{TAB}” WshShell.SendKeys pass2 WshShell.SendKeys “{TAB}” WshShell.SendKeys “{ENTER}”

wscript.sleep 1000 if WshShell.AppActivate(”Pointsec : Error”) = True then WshShell.SendKeys “{ENTER}” Else Msgbox “Password1 = ” & pass &vbCRLF & “Password2 = ” & pass2,,”Gotcha!!!” wscript.quit End if

Next Next

-snip-

The result.. about 4 seconds from click to success! :>

Loaded.png
" Then it loops….

Error.png
" Till finally…

gotcha.png
"

Like i mentioned previously.. the thing that makes it cool is that it abstracts the underlying complexity.. i dont need protocol dumps / traffic analysis to brute a strange server.. i just need their own client.. my vbs might totally suck, and is probably super inefficient.. and since ive used this excuse before, its prolly time to get a decent .vbs book :>

/mh

Blog
Video
Research
QotW
Categories
about:us (31)
blackhat (5)
blog (10)
broadview (2)
build-it (1)
cloud (12)
community (15)
conferences (60)
crypto (3)
fail (3)
foos (1)
fun (51)
goodbye (1)
hackrack (2)
Hope? (2)
howto (8)
imsojaded (2)
infosec-soapies (25)
infrastructure (3)
local (5)
mac (15)
management (7)
materials (3)
memcached (2)
mindless-politics (4)
mindmaps (1)
PCI (2)
post-it (1)
privacy (6)
product (2)
programming (5)
public (275)
qo[w|m|?] (5)
README (1)
real-world (14)
research (37)
reversing (4)
security-fyi (8)
security-news (6)
silly-yammerings (19)
tech-toys (3)
time-waster (6)
tin-foil-hat (6)
tools (46)
training (18)
travel (1)
tricks (1)
Uncategorized (3)
vendors (6)
videos (6)
vulnerability (7)
wasc (1)
webapps (6)
web_x.0 (2)
writing-advice (1)
zen-hacking (6)
Archives
August 2010 (4)
July 2010 (1)
June 2010 (4)
May 2010 (3)
April 2010 (3)
March 2010 (7)
Feburary 2010 (2)
January 2010 (3)
December 2009 (4)
November 2009 (4)
October 2009 (3)
September 2009 (5)
August 2009 (9)
July 2009 (1)
June 2009 (5)
May 2009 (4)
April 2009 (10)
March 2009 (13)
Feburary 2009 (12)
January 2009 (11)
December 2008 (9)
November 2008 (8)
October 2008 (5)
September 2008 (5)
August 2008 (6)
July 2008 (6)
June 2008 (6)
May 2008 (2)
April 2008 (3)
March 2008 (7)
Feburary 2008 (12)
January 2008 (9)
December 2007 (8)
November 2007 (4)
October 2007 (9)
September 2007 (14)
August 2007 (18)
July 2007 (13)
June 2007 (17)
May 2007 (2)
July 2006 (1)
April 2006 (1)
August 2005 (1)
June 2005 (1)
May 2005 (2)
Archives
Conditions of use Privacy statement
Top of Page Legal stuff