Friday, February 29, 2008

"Penetration Testing Ninjitsu" with Ed Skoudis webcast


if you didnt catch it live you can watch the recorded version of “Penetration Testing Ninjitsu” with Ed Skoudis. it was pretty good and two more or lined up, next one is in April.

https://coresecurity.webex.com/coresecurity/lsr.php?AT=pb&SP=EC&rID=4214202&rKey=32920A3595EA5972

slides:

http://www.coresecurity.com/files/attachments/Core_Define_and_Win_Cmd_Line.pdf

Here are my notes from listening/watching it

C:\> ipconfig /displaydns

**dumps the DNS cache, targets that have been recently resolved (may or may not be in the same network)

C:\> arp -a

**dumps the ARP Cache, so that should be boxes on the same subnet as the box you are on

**check to see if anything is in the hosts file, hardcoded IP to DNS

C:\> net use \\[target] [password] /u:[user]

**smb session

C:\> net use * \\[targetip]\[share] [password] /u:[user]

**attaches to the next available file share, you can also specify a drive letter

C:\> net user \\[targetip] /del or net use & /del

**can only have one SMB session with a given target machine as one USERNAME at a time, so you have to delete and so you can delete them all when done

FOR /L Loops --counters

C:\> for /L %i in ([start], [step], [stop]) do [command]

C:\> for /L %i in (1,1,255) do echo %i

**simple counter

C:\> for /L %i in (1,1,255) do echo %i & ping -n 5 127.0.0.1

**pauses 5 seconds between each iteration by using the ping command

**to do more than one command [command1] & [command2]
**run command1 and only run command2 if command1 succeeds [command1] && [command2]

C:\> for /L %i in (1,1,255) do @echo %i & @ping -n 5 127.0.0.1 > nul

**@ = dont display the command

** send errors to file [command] 2>>errorfile.txt

C:\> for /L %i in (1,1,255) do @ping -n 1 10.10.10.%i | find "Reply"

**ping sweeper

nslookup [IPaddr]
**reverse lookup

C:\> for /L %i in (1,1,255) do @echo 10.10.10.%i: & @nslookup 10.10.10.%i 2>nul | find "Name"

**displays successful reverse lookups

C:\> for /L %i in (1,1,255) do @echo 10.10.10.%i: & @nslookup 10.10.10.%i 2>nul | find "Name" && echo 10.10.10.%i

**shows IP and hostname if found

FOR /F Loops --files, strings, a file set's contents

C:\> for /f %i in (password.lst) do @echo %i & @net use \\[target_IP_addr] %i /u:[UserName] 2>nul && echo UserName: %i >>success.txt

** check slides for more examples

**scripting, .bat files

**you have to do double %% in bat files

C:\> for /L %i in (1,1,100) do @echo %i

**turns into

for /L %%i in (1,1,100) do @echo %%i
CG

Thursday, February 28, 2008

Two Good Posts Over on Rational Survivability


Two Good Posts Over on Rational Survivability

Chris Hoff did two good posts over on Rational Survivability.1: News Flash: If You Don't Follow Suggested Security Hardening Guidelines, Bad Things Can Happen...http://rationalsecurity.typepad.com/blog/2008/02/news-flash-if-y.htmlNot so interetested in the VM stuff, but the idea that the press sensationalizes ...

Read More
CG

Saturday, February 23, 2008

Near Real Time Book Writing


Near Real Time Book Writing

While not an interesting book topic for me, the concept of getting the public to help on the book is pretty cool.These guys are basically writing a book on Software Craftsmanship: From Apprentice to Journeyman and allow people to comment on all the facets of the book. Not too much in the way of content ...

Read More
CG

Hacking Exposed Windows 3rd ed Book Review


Hacking Exposed Windows 3rd ed Book Review

4 stars Not bad for the 3rd iteration Disclaimer: I received a review copy of HE:Windows. The latest HE:Windows takes us toe to toe with Vista and Server 2008 and gives us a recap of some Win2k3 and Win2k knowledge. I was torn between whether to give this book three or four stars. I ended up ...

Read More
CG

Wednesday, February 20, 2008

Blackhat DC '08 Day1 wrapup


Blackhat DC '08 Day1 wrapup

Holy crap, just when i was feeling a little blue after shmoocon (I felt the talks were better last year, but location was better this year), BlackHat cheers me up.Dont get me wrong, there are some unfun things. The "con" area is super cramped, no room to even walk during the talk breaks, rooms were ...

Read More
CG

Tuesday, February 19, 2008

Blackhat DC '08


Blackhat DC '08

if anyone will be at BlackHat DC and wants to meet up give me a shout.http://www.blackhat.com/html/bh-dc-08/bh-dc-08-main.html- ...

Read More
CG

Monday, February 18, 2008

Verizon Voyager First Thoughts


Verizon Voyager First Thoughts

so it was time to get a new phone and we are unfortunately stuck with Verizon because the whole damn family is on verizon. given a choice i'd be with AT&T for their phone selection and network availability, anway... i had a blackberry 7130e, the one without the full keyboard. ...

Read More
CG

Shmoocon 2008 (my $0.02)


Shmoocon 2008 (my $0.02)

So I missed day one of the con as I was stuck on planes and in airports for damn ages. After a few hours sleep I headed to DC to meet up with Chris and Joe and check out the presentations. Chris filled me in on H1kari's GSM presentation which sounded really cool. Gonna have to check that out. I got ...

Read More
dean de beer

Sunday, February 17, 2008

Shmoocon 08 Day 3


Shmoocon 08 Day 3

alright Day3!started the morning off right with coffee then off to Valsmith and Danny Quist talking about Malware Software Armoring Circumvention. very cool stuff and, for me, in that sit in a talk about things you dont know what much about. the offensive-computing.net guys built a tool (saffron) ...

Read More
CG

Shmoocon 08 Day 2


Shmoocon 08 Day 2

Ok, i got up a little late and it took the spouse a min or two to get me to the metro, then the metro was doing work on one of the tracks, suffice to say i was late, i got there for noon talks, i tried to get a hotel room friday nite but no dice, did get on saturday nite so i didnt have to deal with ...

Read More
CG

Saturday, February 16, 2008

Shmoocon 08 Day 1


Shmoocon 08 Day 1

hard to believe a year has gone by since the last shmoocon, but it has, here is a quick recap of Day1.Day 1 started out really good.Here is the schedule: http://www.shmoocon.org/schedule.htmlprobably the coolest talk that i caught was H1kari's on cracking GSM A 5/1 Traffic. him and his company essentially ...

Read More
CG

Monday, February 11, 2008

Reliable Local Root since 2006?


Reliable Local Root since 2006?

now that's just friggin sweet...http://blog.eonsec.com/2008/02/reliable-root-since-2006.ht ...

Read More
CG

client side attacks and technical solutions -- is it always a technical solution?


client side attacks and technical solutions -- is it always a technical solution?

After talking to my buddy Joe about some client side attacks he came out with the "what is the technical remediation?" question.It seems the last few years have been about the technical remediation for a non technical problem (exploiting users) delivered over a technical medium (internet/email). The ...

Read More
CG

Thursday, February 7, 2008

Why "sticky" port security is dumb when your physical security sucks


If you havent heard of POPI Security... now you can:

P = Physical
O = Operational (OPSEC)
P = Personnel
I = Information(INFOSEC)

all that whiz bang pop a shell with metasploit and dump your mom's PII stuff falls into the "I" and they go up in order of ease, cost & complexity. For example, throwing a rock through a window and climbing into an office is in the "P" and cheap where a TEMPEST attack is in "I "and usually not cheap and requires a high degree of technical ability. Hopefully that makes sense.

Anyway, all that leads to the "no shit there I was" story of doing the onsite assessment. We roll in and get told there is "Sticky Port Security" on the switches. Begrudgingly we had given them our MAC addresses prior to the assessment so they could reserve us some IP space in the DHCP pool. So we set our IPs to the static ones they said we would have and nothing. A few phone calls later, still nothing.

Eventually we try plugging into empty network drops and setting things to DHCP, viola... IP address (not ones we were assigned) and connectivity. so much for port security, not much good when you leave hot open drops.

The "sticky" part of the security was a pain because we had 4 laptops and only 2 hot drops and the switch would only allow one IP per port. Thankfully, two networked printers were in the room, printing the printer's configuration (giving us its MAC) and SMAC for windows we had the other two laptops up and running. Yes, a simple 4 port router that clones MAC addresses would have worked too, but we didnt bring one.

Getting reverse shells back to our Linux hosts in VMware will be for another post, but we made it happen using VMware NATing & Fpipe.

Anyway, I mention physical security because:
1-we negated the port security by changing our MAC address and unplugging the printer from the network
2-because they didnt turn off ports that were unused we were handed IP addresses on the LAN
3-if the objective had been to just get "access" to the LAN we were done in 20 minutes
4-because of the open drops, 5 minutes and a wifi router and we could have had all the internal access we needed.

Just something to think about when you my smile smugly and tell people you have port security on your switches and your physical security sucks.
CG

MAC address stealing for public wifi use Part 2


MAC address stealing for public wifi use Part 2

Mostly just notes for myself, but since Ubuntu can be a little tricky sometimes maybe they will help some other poor soul too...**Like in the previous post said:run airodump and see who is associated to the WAP you want to access, those MAC's that are associated with the IP have obviously paid (or ...

Read More
CG

Tuesday, February 5, 2008

MAC address stealing for public wifi use


MAC address stealing for public wifi use

Keeping with my theme of "you never know when you need to crack WEP" or be able to get internet access...If you find yourself in a life or death situation and its imperative that you get your lappy up on the net to send that "help me!" email and they are using MAC authentication, ...

Read More
CG