LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Closed Thread
  Search this Thread
Old 01-28-2011, 12:50 AM   #1
msridhar87
LQ Newbie
 
Registered: Feb 2009
Posts: 3

Rep: Reputation: 0
Return to libc attack


Hi,
Am currently doing Return to libc attack as part of an assignment. I have analysed the code and I have replaced the return address to point to system() with /bin/sh as argument. I have the following pattern in the stack.
4 bytes - return address - address of system()
4 bytes - address of exit()
4 bytes - Address of /bin/sh.

When I execute the code in gdb my program spawns a shell, whereas when I execute without gdb my program goes for a gracefull exit and I dont get a shell prompt. Please help me out with this?

Regards
Sridhar M
 
Old 01-28-2011, 03:59 AM   #2
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
I notice that you are new to LQ and would like to suggest that you please review the LQ Rules, here.

Unfortunately, your question is a violation of two of them:
  • Do not expect LQ members to do your homework - you will learn much more by doing it yourself.
  • Posts containing information about cracking, piracy, warez, fraud or any topic that could be damaging to either LinuxQuestions.org or any third party will be immediately removed.
 
Old 01-28-2011, 06:30 AM   #3
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
And on that note, I'm closing the thread.

msridhar87, LQ isn't the place to get help with attack code.
 
  


Closed Thread



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] simulating blackhole attack and wormhole attack in ns-2 aditijigyasi Linux - Newbie 7 07-04-2016 08:50 AM
dpkg return error :post installation script return an error code (1) grimfold Debian 2 09-10-2009 01:55 PM
libc.so.6(GLIBC_2.3), libc.so.6(GLIBC_2.3.2) needed for Linux 7.3.1 vivek_thampy Linux - Software 1 08-09-2004 04:12 PM
libc.so verse libc.so.5 markstevens Linux - Software 4 06-19-2003 11:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 08:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration