Wednesday, August 8, 2007

Defcon 15

Well just got back from Defcon 15. I will start highlighting on some topics I will be covering but for now I will just post pictures. Didn't really take many.

Defcon 15

Wednesday, July 11, 2007

Blogger Move

Moved from Live Journal http://kpan1c.livejournal.com to http://kpan1c.blogspot.com . Blogger had some features I wanted to use so I figured I would give it a shot. I will not kill the live journal account just yet. Also, I am not renewing the kpan1c.org domain since I basically only used it as a redirect.

Tuesday, March 6, 2007

Using PEX Lib

The metasploit framework has a handy little perl lib  to aid you in finding your offset. There is nothing really fancy about it and many may already know about it.  I figured for those who don't, its useful enough to highlight. I did use this in my stack overflow example. 

At a very basic level lets say you got a seg fault by inserting 24 characters for input. With the Pex lib you can create a string 24 characters long all of unique dwords.

To create our pattern of  24 charcters we use pex like so.

perl -e 'use Pex;print Pex::Text::PatternCreate(20)'


or below is a  little perl script that you can just  run with  24 as the input. Ya I'm that lazy!

#pex_pattern.pl
#!/usr/bin/perl

#path to Pex lib in metasploit

use lib "/home/kpan1c/framework-2.6/lib/";
use Pex;

print Pex::Text::PatternCreate(@ARGV[0]). "\n";

./pex_pattern.pl  24

Output will look like so
Aa0Aa1Aa2Aa3Aa4Aa5Aa6Aa7

Now you can just overflow the app with that string and then check EIP or whatever you wanted to overwrite. Once  you see what is in it you can pass that string  to patternoffset.pl located in the sdk dir of metasploit followed by the length of your pattern and bam you got an offset. Handy, and to think I use to create patterns like AAAABBBBCCCC......

./patternOffset.pl 0x35614134 24


References:
http://metasploit.com
http://www.syngress.com/catalog/?pid=3270