Image
 
linkedin_logo.png rss_logo.jpg
twitter_logo.png youtube_logo.jpg
Latest Additions
 
EH-Net Login
Welcome Guest.






Lost Password?
No account yet? Register
Who's Online
We have 34 guests and 3 members online
 
Advertisement

You are here: Home arrow Ethical Hacking Discussions and Related Certificationsarrow Malwarearrow Discovering and writing zero-day exploits?
EH-Net
May 22, 2013, 03:43:41 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Go back to The Ethical Hacker Network Online Magazine Home Page
 
   Home   Help Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Discovering and writing zero-day exploits?  (Read 5934 times)
0 Members and 1 Guest are viewing this topic.
Quote
Newbie
*
Offline Offline

Posts: 5


View Profile
« on: July 26, 2011, 01:59:27 PM »

What are some good resources for learning how to discover a zero-day vulnerability and write an exploit for it? I've got a book that covers an introduction to shellcoding, that I think usually called setreuid, but I was wondering if there was any more complex shellcode out there, and if it was necessary, and what the mechanics are of actually finding a flaw myself and writing the kind of script Metasploit uses.
Logged
cd1zz
Hero Member
*****
Offline Offline

Posts: 561


View Profile WWW
« Reply #1 on: July 26, 2011, 04:05:38 PM »

You've got a number of topics going on here. Lets clarify so I can give you an answer.

To discover 0 days, you need to find a vulnerability in a piece of software. This can be done via fuzzing, source code review, or reverse engineering. There are a bazillion ways to fuzz. Reverse engineering is an art, and it's hard to do. Source code review only works if you obviously have the source code. For the last 6 months, I've been fuzzing the crap out of FTP servers. Since this is a clear text protocol, I just wrote a fuzzer in python and it's very straight forward. You could also use Spike or Sully, which are full blown fuzzing frameworks. Pick up a book on fuzzing, it will open your eyes. This is probably the most common way to find bugs in software.

Shellcoding is just a way of executing instructions directly in memory. This is separate from the vulnerability. Typically, you'd find a vulnerability and then use shellcode to manipulate the program the way you want after you have controlled EIP or SEH. For example, we'd use it to run a shell, connect back to an attacker, jump around memory, use ROP gadgets etc. Creating shellcode like you're talking about, is probably more than what you want to do at this point. Metasploit has tried and true shellcode that even works with encoding. I would just start with that.

To give you a real easy introduction into this, go get a copy of FreeFloat FTP server. This is the biggest PoS software I've seen in awhile. Almost every command is vulnerable to a basic buffer overflow. Try not to look at any of the exploits I wrote, or anyone else on this software. Try to find them on your own by fuzzing the app, finding a vulnerability and then creating an exploit to take advantage of that vuln. If anyone is interested in Buffer Overflows, start with this app!

Does that help?

Logged

Quote
Newbie
*
Offline Offline

Posts: 5


View Profile
« Reply #2 on: July 26, 2011, 04:36:01 PM »

Yes, this helps a bit. Can you recommend a good book on fuzzing?
Logged
cd1zz
Hero Member
*****
Offline Offline

Posts: 561


View Profile WWW
« Reply #3 on: July 26, 2011, 04:38:08 PM »

I have the Sutton book. It's pretty good:

http://www.amazon.com/Fuzzing-Brute-Force-Vulnerability-Discovery/dp/0321446119/ref=sr_1_1?ie=UTF8&qid=1311716257&sr=8-1
Logged

MaXe
Hero Member
*****
Offline Offline

Posts: 669


I've just upgraded myself to a cyborg muahahaa!!1


View Profile WWW
« Reply #4 on: July 27, 2011, 11:42:36 AM »

If you're looking for 0days in Web Applications, you pretty much need to know the language used if you want to go deep, otherwise you can fuzz all the user-input and hope an error is returned but in some cases, a lot of conditions may have to be present for a vulnerability to become visible and possibly exploitable.

You can read more about finding vulnerabilities in PHP scripts by SirGod here:
http://forum.intern0t.net/offensive-guides-information/1382-finding-vulnerabilities-php-sirgod.html
Logged

I'm an InterN0T'er
sil
Hero Member
*****
Offline Offline

Posts: 549



View Profile WWW
« Reply #5 on: July 27, 2011, 11:51:57 AM »

Here's my recommendations on books and sites:

"Fuzzing for Software Security Testing and Quality Assurance" - Charlie Miller, Jared DeMott, Ari Takanen (de-facto must have)
"Fuzzing: Brute Force Vulnerability Discovery" - Pedram Amini, Michael Sutton, Adam Greene (must have)
"Reversing: Secrets of Reverse Engineering" - Eldad Eilam
"The IDA Pro Book" - Chris Eagle

OpenRCE - http://www.openrce.org/articles/

As for tools, usual suspects, IDA, Olly, Immunity Debugger however, I also suggest learning WinDBG as best as possible. Finding bugs via way of fuzzing is difficult if you don't understand programming (assembly to a good degree) nor the operating system and the protocols. For Microsoft, I suggest MSDN become your friend.
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.075 seconds with 23 queries.
 
Exclusive Deal

sansfire13_245x90_cw90.jpg
SANSFIRE 2013
June 15 - 22

5% Off w/ Code: EHN_5

SANS Deals 4 EH-Netters
5% OFF Any SANS Course in Any Format!
Coupon Code: EHN_5 Including SANS Rocky Mountain 2013 & SANS Boston 2013
Polls
Compared to this year, 2013 will be:
 
Recent Forum Topics
EH-Net News Feeds
Latest Additions
 
         
Advertisement

© 2013 The Ethical Hacker Network
Joomla! is Free Software released under the GNU/GPL License.