Advertising (This ad goes away for registered users. You can Login or Register)

[Tutorial] Advanced C

Discuss about your favorite (gaming...or not) devices here. The most popular ones will end up getting their own categories
Programming discussions for your favorite Device
Forum rules
Forum rule Nº 15 is strictly enforced in this subforum.
User avatar
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: [Tutorial] Advanced C

Post by m0skit0 » Wed Mar 14, 2012 8:22 am

frank wrote:I am on Ubuntu 10.04 in a VM (If its the VM scr..ing with stuff, then I'll try again soon as I fix my hard Ubuntu installation)
The VM has nothing to do. Your Ubuntu is old, and if you didn't update GCC, you're using an old GCC as well, so it's normal you don't get the same output.

I see you've posted x/w $1 twice, but you didn't show what you did between one and the other. If you did nothing, well obviously the output is the same and it's correct.
Advertising
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"

frank
Posts: 211
Joined: Wed Mar 23, 2011 5:15 am
Location: northwest usa
Contact:

Re: [Tutorial] Advanced C

Post by frank » Wed Mar 14, 2012 11:12 pm

Alright...
apt-get said that build-essential is latest version
I guess I'll update ubuntu although...egh...oi ill have an updated vm and hard 10.04 (cuz i need that version specifically for other things)

Anyways, i did "s" between those two "x/w $1"s.
Advertising
Sig shrink!
PSP 2000 6.60 ME-1.8
G1 - Super D 1.11
Samsung Galaxy Tab 2 GT-P5113 - CyanogenMod 10
PC - Windows 7 - P4 3.20ghz HT - 3 gb 756 mb RAM - ATI Radeon x600
Cardboard box server - Ubuntu Server :D - AMD Athlon XP 3000+ - 512mb RAM

User avatar
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: [Tutorial] Advanced C

Post by m0skit0 » Thu Mar 15, 2012 9:05 am

frank wrote:Anyways, i did "s" between those two "x/w $1"s.
You need another "s" because you need mov %eax,-0xc(%ebp) to execute to update the value in RAM. LEA instruction only modifies the CPU register, not the variable per se.
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"

frank
Posts: 211
Joined: Wed Mar 23, 2011 5:15 am
Location: northwest usa
Contact:

Re: [Tutorial] Advanced C

Post by frank » Fri Mar 16, 2012 12:47 am

m0skit0 wrote:
frank wrote:Anyways, i did "s" between those two "x/w $1"s.
You need another "s" because you need mov %eax,-0xc(%ebp) to execute to update the value in RAM. LEA instruction only modifies the CPU register, not the variable per se.
Ah, okay i think I understand. So the LEA instruction calculates into a CPU register, and the mov instruction moves it to RAM, right?
I'll try it when I find the time, because I am busy right now.
Sig shrink!
PSP 2000 6.60 ME-1.8
G1 - Super D 1.11
Samsung Galaxy Tab 2 GT-P5113 - CyanogenMod 10
PC - Windows 7 - P4 3.20ghz HT - 3 gb 756 mb RAM - ATI Radeon x600
Cardboard box server - Ubuntu Server :D - AMD Athlon XP 3000+ - 512mb RAM

User avatar
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: [Tutorial] Advanced C

Post by m0skit0 » Fri Mar 16, 2012 8:31 am

frank wrote:So the LEA instruction calculates into a CPU register, and the mov instruction moves it to RAM, right?
Absolutely.
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"

User avatar
Lord Aaron
Posts: 22
Joined: Tue Oct 01, 2013 8:56 pm

Re: [Tutorial] Advanced C

Post by Lord Aaron » Wed Oct 02, 2013 7:43 pm

how is this "Advanced C"?, it's basically just assembly. Advanced? yes, C? no

User avatar
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: [Tutorial] Advanced C

Post by m0skit0 » Fri Oct 04, 2013 6:47 pm

m0skit0 wrote:Now that I covered some basics [...] I'll start with the real thing on next part
Do you know what introductions are? I'll explain to you in detail since I see you comment before reading: these are the foundations for next parts, so obviously you need to know this kind of stuff before continuing. Maybe not everyone knows this kind of details about how C actually works. If you do, then I'm so happy for you! :D

PS: Good luck with your usermode exploits for HBL ;)
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"

User avatar
Lord Aaron
Posts: 22
Joined: Tue Oct 01, 2013 8:56 pm

Re: [Tutorial] Advanced C

Post by Lord Aaron » Fri Oct 04, 2013 7:09 pm

m0skit0 wrote:Do you know what introductions are? I'll explain to you in detail since I see you comment before reading: these are the foundations for next parts, so obviously you need to know this kind of stuff before continuing. Maybe not everyone knows this kind of details about how C actually works. If you do, then I'm so happy for you!
ok I get your point
m0skit0 wrote:PS: Good luck with your usermode exploits for HBL
wha?

User avatar
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: [Tutorial] Advanced C

Post by m0skit0 » Fri Oct 04, 2013 7:16 pm

Lord Aaron wrote:wha?
Nothing, I confused you with someone else :lol:
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"

User avatar
Acid_Snake
Retired Mod
Posts: 3099
Joined: Tue May 01, 2012 11:32 am
Location: Behind you!

Re: [Tutorial] Advanced C

Post by Acid_Snake » Fri Oct 04, 2013 9:31 pm

m0skit0 wrote:
Lord Aaron wrote:wha?
Nothing, I confused you with someone else :lol:
maybe you were right

Post Reply

Return to “Programming and Security”