Page 2 of 3

Re: [Tutorial] Advanced C

Posted: Wed Mar 14, 2012 8:22 am
by m0skit0
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.

Re: [Tutorial] Advanced C

Posted: Wed Mar 14, 2012 11:12 pm
by frank
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.

Re: [Tutorial] Advanced C

Posted: Thu Mar 15, 2012 9:05 am
by m0skit0
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.

Re: [Tutorial] Advanced C

Posted: Fri Mar 16, 2012 12:47 am
by frank
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.

Re: [Tutorial] Advanced C

Posted: Fri Mar 16, 2012 8:31 am
by m0skit0
frank wrote:So the LEA instruction calculates into a CPU register, and the mov instruction moves it to RAM, right?
Absolutely.

Re: [Tutorial] Advanced C

Posted: Wed Oct 02, 2013 7:43 pm
by Lord Aaron
how is this "Advanced C"?, it's basically just assembly. Advanced? yes, C? no

Re: [Tutorial] Advanced C

Posted: Fri Oct 04, 2013 6:47 pm
by m0skit0
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 ;)

Re: [Tutorial] Advanced C

Posted: Fri Oct 04, 2013 7:09 pm
by Lord Aaron
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?

Re: [Tutorial] Advanced C

Posted: Fri Oct 04, 2013 7:16 pm
by m0skit0
Lord Aaron wrote:wha?
Nothing, I confused you with someone else :lol:

Re: [Tutorial] Advanced C

Posted: Fri Oct 04, 2013 9:31 pm
by Acid_Snake
m0skit0 wrote:
Lord Aaron wrote:wha?
Nothing, I confused you with someone else :lol:
maybe you were right