Room362.com

Blatherings of a security addict.

Social Engineering Challenge #1 Answer

| Comments

Well, it’s not the only answer but I will call them that because it’s what worked for me:

Sitting a couple rows down from the line so that no one would see me from the bus line I was targeting, I waited for the bus to come. As soon as it came rolling up and quickly moved into a dash for the door, timing it so that I could cut in line to be the 4th on. When contronted by the bus driver, I said that I had dropped my wallet a few stops back and and wanted to find it. Dropping my wallet while I ‘looked’ for it allowed me to certify this lie. I asked the busdriver if I could ride the bus back around to my original stop. He said yes and I was allowed to ride free of charge. And, due to all of this drama the target was already seated and others have taken up bubble-room spots (no body likes to sit together), so I didn’t look completely odd sitting next to the target. I even got up when a elderly woman came to sit down. By that time dialog was already started with the target and my honor was solidified by my kindness to others.

These challenges don’t have prizes or winners, it’s just here to make you think. The goal is not to raise too much suspicion and gain trust.

Social Engineering Challenge #1

| Comments

Here is the scenerio:

There is a line of government, and commerical workers that are in line for the bus. The bus is late, and everyone has had a long day of work. Your target is the first person in line. The line is 75 people long for a bus with a max occupancy of 35 people. Your target is the same sex as you and has headphones in their ears. You can use any prop item that would not look out of place in line for a bus with other commuters.

Your goal is to sit next to your target in order to start a dialog. You do not need to be 1st, 2nd or even 3rd in line, but you do have to get on the bus with the least amount of suspicion raised. (That doesn’t rule out being flambouant)

Comment your solutions with detail.

EDIT: I will post how I was able to do it tomorrow. For all of these challenges I will publish the way I succeeded at 11:59 PM EST of the next day.

Mubix’s Links

| Comments

So there are all kinds of links that I find and queue up to look at but hate keeping them open in tabs, and they aren’t always in Google Reader and I don’t want to spam to twitter, so Mubix’s Links was born. I setup ScribeFire with a new blogspot account and now, no more tabs, it truely feels like an application of GTD. Plus it allows anyone who is interested to follow along via the blogspot feed. As edsmiley commented in IRC something to the effect of that he doesn’t need all the security blog feeds he just lets me do all the work.

Maltego 2 and Beyond - Part 2

| Comments

Now that you have had some time to play around with Community Edition or if you were lucky (or rich) enough, the Full version. We are going to start delving into the the pieces of Maltego and then in Part 5 we rip it apart and put it back together for PT-TAS (Penetration Testing – Transform Application Server). I am going to say “investigation” a lot in the coming paragraphs and parts of this article. what I mean when I use this word is everything from ego and tin-hat searches to the military grade or counterintelligence level searches. As stated before, Maltego Community Edition is free. Use it however and for whatever you want. If you think of a new and interesting way of using Maltego please send me an email and I will make it part of this series, or post it in the Maltego Forums. Paterva is always interested in hearing from the community, especially feature requests.

First lets outline whats to come:

Table of Contents:

The reason I am not going into the installation or registration of Maltego is because 1. It’s already installed on Back|Track and 2. Because Paterva already has a great wiki article on the topic. So lets begin:

![](http://s3.media.squarespace.com/production/438411/4879756/uploads/entity.jpg)

Entities

 (wiki article on Entities)

Entities are the basic nuts and bolts of your investigation. Entities spawn other entities through the use of transforms. But, what is an entity? Well at the time of this publishing it can be one of the following

Infrastructure Palette:

  • AS (Autonomous System Number): This is a number assigned to a network that allows BGP (Border Gateway Protocol) to know where it’s neighbors are. (And there aren’t any exploits for BGP right?)

  • DNS Name: This is a human readable form of an IP. And, unlike my mother believes, a DNS name does NOT mean it’s a web site. For example hr2xp00209.contoso.com does not serve up a web site, well at least it shouldn’t. (And there are no exploits for DNS right? -PPT LINK-)

  • Domain: In the sense of a DNS domain. This can be localdomain.local contoso.com, or microshaft.com

  • IP Address:  The 4 byte (or 16 byte with IPv6) set of numbers that computers understand better than DNS names

  • Netblock: A block of contiguous IP addresses that are “owned”

  • Website: (Myspace.com, DUH!)

Personal Palette:

  • Email Address:YourSuperCoolHackerHandle@h4x0rbl0gthatyouneverupdate.com (And then you sign that email address with your super secret family-only email address that you never use, with your PGP key)

  • Location:Area 51, Washington DC, The Moon

  • Person: A first and and last name (we will get into handles with “Phrase”, also, remember that PGP key you used, oh it has your full name on there)

  • Phone Number: This is a 7 digit or 10 digit number, returns a lot of false positives in my experiance, but has also pulled some great contact info for companies that weren’t available from their site. (i.e. someone posted their details in a group or forum asking for help)

The last entity is “Phrase”. I specifically isolated it because of its untapped power in Maltego. This is a Google hacker’s dream. This entity will send any Google hack (or regular search term/phrase) you have to a search engine (Out of the box it’s Yahoo) and then extracts as many of the above entities as it can. To couple the power of Google hacking with all of the information you have gathered, and if the old adage, “Knowledge is Power” is right. You now have at your disposal a nuclear arsenal worth of “power”. Add PT-TAS (which we will talk about later) and you might as well have an Ion Cannon for your investigation.

http://s3.media.squarespace.com/production/438411/4879756/uploads/ion_cannon.serendipityThumb.jpg

Transforms

 (wiki article on Transforms)

There are more transforms than I have space for and you really don’t need me to insult your intelligence any more than I already have with my list of entities. So, I am picking out a few of my favorites that might get you a tad bit worried enough to go out and download Maltego, just to see if they pop on you.

  • Email to PGP: It takes an email address and then checks to see what other email addresses you have signed with your key and what the name associated with those email addresses are, along with the email address you searched for. Makes you kind of think of what other security tools can be turned back on themselves.

  • IP or Netblock to Wiki Edits: With this tool you can get a sense of what changes a company/person/organization makes to Wikipedia. I have had mixed results with how much information return this gets but, as you can see by this interesting graph. Three letter agencies like to make edits ;–)

  • Metadata Extration from Documents: The transform is an information gold mine. It could give you insight into the names of users, the domain’s naming convention, possibly even the internal domain name and version of software made that document.

  • Rapleaf and Spock Search (Social Networking search): If you don’t get anything right of the bat, try again later. These services index items on request so if you are the first one to query and email address or phrase, it might take 20 minutes to index and be ready with results. Also, have you ever added your friends to a social networking site via your address book or contacts list (IM/Webmail/Outlook)? Well what if your address book that you uploaded as a search included every email address or phrase that you have found in Maltego? 

We have now gotten the basics and the building blocks, next we go into the Human Factor. Sort of like a OCD instructor I will be helping you to make leaps of faith based on logic that Maltego, or any automated system for that matter, just can’t do.

 

Love What You Do

| Comments

Do what you love, love what you do is what I have been told since I was young, and Gary V takes that puts it in the mirror and makes you look at it with the following video:

Confusion and Delay

| Comments

Due to a PEBKAC error with the ID 10 T, I have had to retype parts 2 and 3, which were ready to go out the door.

In the mean time while I fix myself, here are a couple sites that can keep you busy:

Search google for exploits:

Watch just about any TV show (and some movies) online:

Play any NES game online:

Start a blog without any signup?

Runtime Packers - Hold the Cheese

| Comments

So we are taking a short break from my 4 part series on Maltego to bring you a guest post on runtime packers done by your friendly neighborhood Security Shoggoth. Packers are one of those mystical tech items out there that for most people sound too complicated to even look into. What SecShoggoth and I aimed for with this post is to have understandable yet technical and I think he did an awesome job:

What is a packer?

What do they do?

A packer, also known as a run time packer, is a program which compresses another executable to a smaller size on disk.  When executed, the packed executable is uncompressed in memory and executes.  The time to uncompress the executable in memory is usually not noticeable, making it very advantageous to use one.

There are hundreds of packing programs available.  One of the most commonly used is UPX (http://upx.sourceforge.net) which will pack a number of executable formats.  Unlike most packers, UPX can unpack a program to its original, uncompressed state.  Many packers do not have this functionality and analysts who wish to unpack a program have to find a separate unpacker or manually unpack the program in a debugger.

Why do virus/malware developers use them?

There is one side effect of packers that malware developers have found useful.  Not only does the packer make the malware smaller and easier to transfer, but they also obfuscate or encrypt the internal components of the malware making static analysis virtually impossible. 

For example, normally an analyst would be able to look at the internal strings of a malware sample and determine some of its functionality – such as what registry keys it adds, what URLs it contacts, what functions it loads, etc.  However, by using a packer on the malware, the internal strings would be compressed and obfuscated, hiding them from view.  The only way to view to internal strings would be to unpack the malware – something which is not always an easy thing to do.

Some packers also contain anti-virtual machine, anti-sandboxing and anti-debugging “features” which prevent the packed executable from running if it detects any software analysts typically use to analyze malware.  This makes it much harder for the malware to be analyzed and will extend the amount of time before it can be reliably detected by AV software.

How do they work?

When an executable is packed, the packer compresses the original program and places some wrapper code around it.  When the packed program is executed, this wrapper code runs and uncompresses the original program in memory, loads any dynamic libraries needed by the import table and jumps to the original entry point (OEP) of the now uncompressed program where it begins execution.

Will AV detect packed programs?

It depends.  Not being in the AV industry I can’t comment on every anti-virus program but from my experience with anti-virus and bypassing them, I can make some educated guesses.

From my experience, most AV programs handle packers in two ways.  First, if they can detect the packer being used they may try to unpack it – provided they have an unpacking routine for that packer.  For example, UPX is a common packer (with it’s source available). I would bet that most AV have a UPX unpacking routine which, when it detects a UPX-packed executable, unpacks and scans it.  Therefore, if you packed pwdump with a known or common packer, the AV will still detect it.

However, if you used a packer the AV did not know how to unpack (such as a custom packer or one the AV does not have a routine for), then the AV would most likely not be able to detect the malicious program on disk and would have to wait until it was launched into memory to detect it.  Malware authors already know this so some are starting to use custom packers.  The Race To Zero contest at this year’s Defcon was about just this – trying various methods to hide an executable from AV on disk.

There are still ways AV can determine if a program has been packed even if it doesn’t know what packer was used.  When a program is packed various things happen to the header and the internal structures of the program.  AV can detect these signs and make an educated guess that the program is packed by a custom packer and, if it meets some internal AV criteria, the AV may flag the program as malicious.

If the AV is able to detect the packer but does not have a routine to unpack it, the AV may still flag the executable as malicious based on the packer it detects.  As you blogged about a few days ago, Alex Eckelberry at SunBelt Software did an experiment by packing Windows notepad with various packers and submitting it to VirusTotal.  Based on his results, some AV programs are flagging programs as malicious based only on the packer that was used on it.  (http://sunbeltblog.blogspot.com/2008/09/how-to-make-notepadexe-malicious-file.html)

What are some resources that I can learn more about packing?

If you want to learn the basics on packers, I would recommend Paul Craig’s 2006 Ruxcon presentation “Unpacking Malware, Trojans and Worms.  (www.openrce.com) and the forums at http://www.reverse-engineering.net.  I also like the Websense Security Labs blog (http://securitylabs.websense.com/) as they have posted in the past about their experiences with unpacking malware.

There really are way too many resources out there for me to list.  In the end, Google is your friend.

Where can people find out more about me?

They can always check out my blog at http://secshoggoth.blogspot.com, follow me on Twitter (secshoggoth) or listen to me on the Security Justice webcast (www.securityjustice.com).  :P

A commenter who was unable to post their comment for some reason had this to say:

PeID is a nice little tool for looking at an exe and finding what it is packed with, what encryption it may be using, and also to look at the strings. It also lets you unpack a lot of exe’s, but can be dangerous as it can let the programs run to do this. It’s nice to use it if you do not want to trace through a debugger and just want a quick way to look at the dll’s it hooks to and the strings in the program.

— digip

Maltego 2 and Beyond - Part 1

| Comments

First lets outline whats to come:

Table of Contents:

EDIT: This and the following posts are also show notes for the Season 4 premiere of Hak5

So Maltego 2 has been released and all I have to show for it are these images stolen from paterva.com

![](http://s3.media.squarespace.com/production/438411/4879756/uploads/maltego_ss1.serendipityThumb.png)

![](http://s3.media.squarespace.com/production/438411/4879756/uploads/maltego_ss2.serendipityThumb.png)

and a bit of an explination also stolen from their site:

![](http://s3.media.squarespace.com/production/438411/4879756/uploads/maltego_whatis.serendipityThumb.png)

But you aren’t here for what you can find on their site. You are here to find out why Maltego is fun, useful, and something you might want to recommend your boss/secretary/parents to buy.

Maltego is hard define because of it’s open nature. It is designed to be whatever that information gatherer wants it to be. But before we go into Maltego’s super powers, lets define the differences between it’s two versions, Full and Community editions.

Full is just as it implies. Unfettered. You can make it fly. But it’s 400 bucks a year per client. (Or your organization can talk straight to Paterva about their server/client platform)

Community Edition is free, but you are locked down quite a bit. Community Edition is bundled with Back|Track 3 which is don’t by the awesome guys over at Offensive Security. Here are the nags:

  •  A 15 second nag screen

  • Save and Export has been disabled

  • Limited zoom levels

  • Can only run transforms on a single entity at a time

  • Cannot copy and paste text from detailed view

  • Transforms limited to 75 per day

  • Throttled client to TAS communication

However, if you do have one full version client, you can open saved investigations (mtg files) with it and manipulate it all you want. 

So that is just one of my tricks and now that we have a baseline down (kinda like getting done with all of your base classes in college), in the following segments of this post I will be showing of some of the electrolyte driven goodness of Maltego and some of the hacks/tricks that will make you look wonder just what you can’t do with Maltego.

Google Docs Bug

| Comments

 So, instead of doing this the right way, which is submitting a bug report to google, I am going to do this the blogger way:

  1. Publish article to blog about problem in product

    • Wait for traffic to rise on blog

    • Become giddy at rise in traffic due to outstanding title

    • Watch as traffic falls within days

    • Become angry and write retort (in said blog, still not contacting the company) getting mad about the STILL unfixed problem

Actually thats a lie, here is what I reported to Google after I wrote the above statement:

This problem only happens in a specific sequence of events, but can be easily reproduced.

  1. User 1 opens Google Doc that is collaboratively edited.

    • User 1 closes browser (with save session ability)

    • User 2 opens Google Doc and makes an edit to that same document

    • User 2 saves the new edits (through AutoSave or save/close or save)

    • User 1 at any point after this save (User 2 doesn’t have to have the document closed), opens his saved session browser and it opens the old version of the doc. If user 1 then waits long enough for AutoSave to do its thing or save/closes it, then the document is saved in its old status.

This can easily be fixed by reverting via revision history to the “newer” version, but also can easily go unnoticed. A suggestion for a fix would be a nice popup on User 1’s screen saying that there is a newer version of that document available.

If you have a fix, please leave a comment. I would really hate to find out that this is a simple preferences setting.

Notepad Is a Virus

| Comments

Original Article: http://sunbeltblog.blogspot.com/2008/09/how-to-make-notepadexe-malicious-file.html

Archive.org Saved Page

Alex Eckelberry over at Sunbelt got an itch to see which virus vendors were just using packer signatures instead of emulating the defaltion process and detecting the virus inside. This is a shortcut that can yield false positives such as demonstarted in Alex’s experiment, but is done due to the overhead such an undertaking would introduce, I assume, to the client software.

I bring this up here because I recently conducted a somewhat similar test, although I admittedly know very little about packers. I submitted a couple of No-CD cracks that I got from a unnamed source (GameCopyWorld.com) and tested it with VirusTotal.com to see if they had viruses, and all of them came back positive. I doubted these finding since they were mostly labeld “Trojan.Downloader” and similar generic names. I then used Sunbelt’s very own CWSandbox and a few local tools to determine of the trojan downloaders I had were actually that. All tests came back stating non network connections, packed by UPX, and made minimal DLL calls which were all used to disply windows GUIs.

Alex’s article and my recent research renewed my want to learn more about packers. Where to start? Wikipedia. Nope! Wikipedia’s article on runtime packers hasn’t been written yet. I haven’t stopped searching for a good resource on the topic, but if anyone knows one, please leave a comment and a link.

Thanks