Assembly Primer For Hackers (Part 3) Gdb Usage Primer

Posted By: SecurityTube_Bot
Posted On: Mon 21 Feb 2011
Views: 40675
Share this video:
Share it on Facebook Share it on Twitter Share it on Reddit Share it on Digg Share it on Stumbleupon
Support SecurityTube:


Description: This is Part 3 of the "Assembly Primer for Hackers" video series. Please begin watching from Part 1 if you have not already done so.

GDB (GNU Debugger) is probably one of the most important tools one needs to be familiar with in order to be a good assembly language programmer. In this video we go through a quick primer on how to use GDB to disassemble code, set breakpoints, trace through code, examine CPU registers and memory locations, examine the program stack and many other important use cases which will help us in later videos when we actually start coding in Assembly and want to debug our code. We use SimpleDemo.c as the program in this video.

 

Tags: programming ,

This video is part of the following groups:

1. Assembly Language Megaprimer for Linux ( 11 videos)


Comments (24)

shashank on Fri 25 Feb 2011

nice vdo

xorxorxor on Tue 01 Mar 2011

thank you!

KINGSABRI on Thu 17 Mar 2011

Thanks man

Review:

#--> To Attaching an Application in GDB
gdb ./ApplicationPath

#--> To find farther information about a command
help command

#--> To List the Application Code w/ Specific line
list LineNumber

#--> To Run the Application
run

-> if application needs argument(s)/input(s)
run arg1 arg2 argx

#--> To Disassemble a particular function
disassemble FunctionName

#--> To make Break Point in Particular Line
break LineNumber

#--> To Step forward into application - Step One instruction exactly
s
--> of
stepi

#--> To Show current Registers' information
info registers

#--> To Examine the Value in Particular Address (by hex)
x/10xw 0xMemoryAddr

Immense on Sat 23 Apr 2011

Thanks a lot. Step by step guide is really nice.

charst46 on Fri 27 May 2011

Really appreciate your work.

I am running Dev C++ and I included the C compliler with the package. I cannot get Dev to compile. The compiler gets to the atoi line and halts. I get the error message invalide conversion from char to const char. I ran another program (simple one of averaging two numbers) and asked it to debug. While it is in a Windows environment (I know, that is the next vid), I can still see what is happening and understand a little what is going on.

Being a newbie I really appreciate your work here and the increased knowledge you have given me.

redBandit on Tue 21 Jun 2011

I like your style of teaching you present the material in clear language and i like the way you do a recap at the end as well . I think it would be cool if you could have a bullet point power point at the end to abstract the concepts covered.

DW2054 on Mon 04 Jul 2011

This is a complicated subject, but you work very hard at making it approachable. Even with a programming background - assembly feels like Mars :')

Thank you!

lardycake on Wed 06 Jul 2011

Thanks for the videos! I'm really enjoying this and learning a lot.

xplt on Fri 08 Jul 2011

As always! Another great movie! Thank you Vivek!

forexwaldo on Wed 13 Jul 2011

Thank you so much for taking the time to make these videos. College Course < Your Videos

mac on Tue 26 Jul 2011

Sir well your lecture's are pretty cool,and every new episode is such a importance in itself typically good for newbies. I 'm enjoying a lot. One thing i like most as you know where to stress at topics

thanx to you

rakesh on Sun 31 Jul 2011

too good..thanks a lot for such a clear video..

MANIKANTH on Sun 07 Aug 2011

wow u r amazing ... Jahapana..thusi great hu..

MANIKANTH on Sun 07 Aug 2011

please create and upload a seriers on SQL injection please please please

bot_master on Sun 14 Aug 2011

@manikanth..if you want to learn sql i guess you might know it probably but check the papers available on exploit-db.com its a very good website to find tools and exploits

Sceleratus on Tue 30 Aug 2011

absolutely quality. thank you very very much

estenole on Thu 08 Sep 2011

When you print the stack you decide to print 10 words, how do you know whats the stack length ? Maybe this is explained on later videos but couldnt resis to ask. Apart from this question i cannot be more gratefull with the work you had/are doing with this videos.

Ive tried several times to start lerning asm, but i allways ended leaving the books apart
by its long and boring introductions, you give a direct and easy to understand explanatins that are great, and that are making myself and much other finally getting to asm world.

Thank you so much vivek !!!

estenole on Thu 08 Sep 2011

Ok got it, ill answer myself this time .-)

I guess you print the stack 10 times because when you disassembled the add function it contains 10 operations ?

Am i correct ?

abhilash on Tue 11 Oct 2011

When we display ESP using x/10xw it gives
0xbffff450:
0xbffff460:

why the range is 450 and then 460 can you explain?
In a 32bit system how a program stores values in to stack, suppose char buf[4], how the four bytes memory is stored in stack of 32 bit?

ulcimd1 on Thu 13 Oct 2011

This is SO AWESOME! I have tried to understand debuggers and assembly before on my own, but failed miserably! After this primer, I may actually have a chance! You sir, ROCK!

JoeNakhoulia on Tue 18 Oct 2011

Simple and concise.. I am impressed.. hope to enroll with the rest of the courses.. but I have to finish all the videos first.

Thank you so much

AndyV on Sat 29 Oct 2011

@abhilash;

1 byte = 8 bits
4 bytes = 32 bits
1 word = 4 bytes = 32 bits

When dealing with the stack each address holds 32 bits, or 1 word.

raviscjp on Sun 13 Nov 2011

Great as always....

DeepakYadav on Fri 20 Jan 2012

Great videos thanx for sharing...

Login to post a comment