Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


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

Rep: Reputation: 0
Return to libc attack

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?

Sridhar M
Old 01-28-2011, 04:59 AM   #2
Senior Member
Registered: Jul 2007
Distribution: Ubuntu 10.10, Slackware 64-current
Posts: 2,124

Rep: Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778
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 or any third party will be immediately removed.
Old 01-28-2011, 07:30 AM   #3
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

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

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

Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 5 10-25-2010 05:38 AM
dpkg return error :post installation script return an error code (1) grimfold Debian 2 09-10-2009 02:55 PM, needed for Linux 7.3.1 vivek_thampy Linux - Software 1 08-09-2004 05:12 PM verse markstevens Linux - Software 4 06-19-2003 12:41 PM

All times are GMT -5. The time now is 02:42 PM.

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