News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Structure and Stack

Started by acake, December 07, 2019, 03:13:46 AM

Previous topic - Next topic

acake

Disclaimer (because disclaimers are cool): I know that everything related to shellcode is forbidden here but let me explain you why I'm currently asking that question.

I personally realize that those kind of program obligate me to think in a really low level point of view and I personally like that because I realize that there's many things I don't know about memory etc...

Now let's ask my "illegal" question.

Let's take an example of well known structure, PROCESSENTRY32, the size of this structure is 296 bytes.

I was just wondering how structures works in a low level point of view ?
If I want to use one, (in a purely illegal program for sure), should I just allocate 296 random bytes or it is more complex ?

I'm sure that it isn't just 296 random bytes because how the program will detect the fields in the structure and know their size ?
Or maybe those fields are just independent variables and I've been in an illusion during all my life ?

So how does structures works in a low level point of view ?

Thanks.
La mort prouve l'immortalité car l'homme ne peut pas plus cesser d'être que le néant ne peut cesser de ne pas être.

hutch--

> So how does structures works in a low level point of view ?

The same as it works in any other level, an address in memory (the start address) and a sequence of offsets from that start address for data defined by the structure. Be careful with the questions related to shell code or any other related field, not only do we shoot first and ask questions later but we kick out people who ask them.