Remote Exploit Forums

Go Back   Remote Exploit Forums > Specialist Topics > Pentesting


Pentesting Specific topics related to legal penetration testing

Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 10-15-2009, 06:27 AM
Senior Member
 
Join Date: Jan 2008
Posts: 207
Default

Metasploit Framework - /modules/exploits/windows/ftp/3cdaemon_ftp_user.rb - Metasploit Redmine Interface

here is the source to the 3com user exploit
Reply With Quote
  #12 (permalink)  
Old 10-15-2009, 06:38 AM
Member
 
Join Date: Oct 2008
Posts: 34
Default

I'm not trying the USER exploit, I'm trying a exploit on the MKD command. I''ll look in ntdll, but I'm not sure how to search for a sequence of commands in Olly, especially something like POP POP RET where the things being popped don't exactly matter and it's more like a wildcard type search
Reply With Quote
  #13 (permalink)  
Old 10-15-2009, 08:47 PM
Junior Member
 
Join Date: Oct 2009
Location: Rio Grande do Sul
Posts: 8
Default

You can use msfpescan -p [TARGET], the program will search for POP POP RETs for you and show the addresses in the screen. =)
Reply With Quote
  #14 (permalink)  
Old 10-16-2009, 12:34 AM
Member
 
Join Date: Oct 2008
Posts: 34
Default

I did that before, it didn't get any that didn't start with 0x00. I just went into the Executable Modules list in Olly, found ntdll and searched for pop edi and pop esi neither of which helped so I just searched for ret and found a POP POP RET that started with 0x77.
Reply With Quote
  #15 (permalink)  
Old 10-16-2009, 08:57 AM
lupin's Avatar
Moderator
 
Join Date: Mar 2009
Location: Australia
Posts: 945
Default

Quote:
Originally Posted by oib111 View Post
I tested it and if I overwrite EIP with 0x42424242 it does the same thing. But if I remove the the jump it works...?
Is it the \xeb character or the \x0a character in your jump sequence thats causing the problem? My guess is that its the \x0a - (check its ASCII value for a clue as to why it would be causing a problem)

Quote:
Originally Posted by oib111 View Post
I did that before, it didn't get any that didn't start with 0x00. I just went into the Executable Modules list in Olly, found ntdll and searched for pop edi and pop esi neither of which helped so I just searched for ret and found a POP POP RET that started with 0x77.
Use msfpescan to search for the pop, pop, ret, find the exact sequence of commands from that file (e.g. pop esi, pop ecx, ret) then search for those using ollydbg to get a relative address for the command. If its for an SEH overwrite, use the SafeSEH plugin in Olly to find dlls with SEH disabled (and don't use an address within the main program itself).
__________________
Nancy Astor: If I were your wife I would put poison in your coffee!
Winston Churchill: Madam, if I were your husband I would drink it.

Last edited by lupin; 10-16-2009 at 09:25 AM.
Reply With Quote
  #16 (permalink)  
Old 10-16-2009, 04:22 PM
Member
 
Join Date: Oct 2008
Posts: 34
Default

Ah, a new line feed. How do I get around this, just jump a little farther? Also, I believe I asked this question in the thread, but it went unanswered, how do I know which characters I can't use in an exploit?
Reply With Quote
  #17 (permalink)  
Old 10-16-2009, 05:03 PM
lupin's Avatar
Moderator
 
Join Date: Mar 2009
Location: Australia
Posts: 945
Default

Quote:
Originally Posted by oib111 View Post
Ah, a new line feed. How do I get around this, just jump a little farther?
Yep. Yes, you get around it by jumping a little further, or you could move your jump instruction two places forward and have the two padding NOPs after it.

Quote:
Originally Posted by oib111 View Post
Also, I believe I asked this question in the thread, but it went unanswered, how do I know which characters I can't use in an exploit?
You'll find out by trial and error. When you feed something into a buffer that stops your program from crashing in the same way, its usually because of a restricted character.

You can find out which character/s is/are bad by the process of elimination - feed in bits of your buffer at a time with other known good characters as padding - and see when the problem starts. You can also try and examine the contents of memory after feeding your buffer in, but this method isnt always that reliable (depending on the bad character its not always obvious what has caused your buffer to get mangled).
__________________
Nancy Astor: If I were your wife I would put poison in your coffee!
Winston Churchill: Madam, if I were your husband I would drink it.
Reply With Quote
  #18 (permalink)  
Old 10-17-2009, 03:03 AM
Member
 
Join Date: Oct 2008
Posts: 34
Default

Now, if the problem persists, it is possible that 0xEB is a bad character, right?
Reply With Quote
  #19 (permalink)  
Old 10-17-2009, 04:09 AM
Lincoln's Avatar
Senior Member
 
Join Date: Apr 2008
Posts: 319
Default

SHORT Jump Instructions
__________________
Homer: You don't like your job, you don't strike. You go in every day and do it really half-assed. That's the American way.
Reply With Quote
  #20 (permalink)  
Old 10-17-2009, 04:45 AM
Member
 
Join Date: Oct 2008
Posts: 34
Default

Thanks for the link. Also, I was doing some investigating and I followed the third address on the stack (the one that points back into my buffer) in the stack instead of in the dump and I got this:

Code:
0294FBC0   0FEB9090  Pointer to next SEH record
0294FBC4   42424242  SE handler
I don't know much about SEH, but I feel like that 0x0feb9090 as the pointer to the next SEH record is causing some problems.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 08:46 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2