The Open Source Swiss Army Knife

/code/assembler/
/code/assembler/ + sub-categories
http://www.sirfsup.com/
web directory content
    
      

Not logged in
Chat Register Login
return to:  http:/www.sirfsup.com      /code   /assembler 
sub-categories and articles

                                                  
dirkoziol source code the shellcoders handbook
dirmips all MIPS source code for computer organization 2
   --->create new sub-category


GetData.java
add

// GetData.java: fetch the next int from input.

IntegerRep.java
add

// IntegerRep.java: Dec, Bin, and Hex

assembler.txt
add

assembler

  1. definitions
  2. types of instructions
  3. types of intel registers
  4. compiling the intel example

exit_shellcode.txt
add

Section .text global _start _start: mov ebx,0 mov eax,1

foobar.c
add

/* http://www.cgsecurity.org/Articles/1-MISC/Protections-1/  */

intel_reg.htm
intel registers mnemonics examples

The following are 32 bit registers so each can hold one word == 0xAA like that.

EAX Accumulator for operands and results data.the function number is placed in EAX
mov $0xfc, %eax (syscall 252 == exit_group)
mov $0x1, %eax(syscal 1)
By putting somethign into %eax, we automatically set the value returned
EBX Pointer to start/location in data in the DS segment.
one of the base registers-- to do with data addressing modes
has historically been used for working with the stack
mv 0x4(%esp,1), %ebx ("an instruction that loads the argument to our exit syscal into EBX")
mov eax, [ebp+10h] (moves dword from16 bytes down the stack)
ECX Counter for string and loop operations.
EDX I/O pointer.
EBP Pointer to start of stack (in the SS segment).
one of the base registers-- to do with data addressing modes
also called the frame pointer (== start of the stack)
ESI Pointer to data in the segment pointed to by the DS register; source pointer for string operations.
EDI Pointer to data (or destination) in the segment pointed to by the ES register; destination pointer for string operations.
ESP Stack pointer (in the SS segment). points to the last address used by the stack
by subtracting from this value can overwrite the stack by overwriting that new address

sizeoflong.c
add

int main() {

stacks.txt
direction assembly stack growth

*stack grows from higher to lower addresses * "MIPS software allocates another register just for the stack: the stack pointer ($sp), used to save the registers needed by the callee. By historical precedent, stacks "grow" from higher addresses to lower addresses. This convention means that you push values onto the stack by subtracting from the stack pointer. Adding to the stack pointer shrinks the stack, thereby popping values off the stack." (page 80, hennessy). he gives instruction like *addi, $sp, $sp, -12 # adjust stack to maek room for 3 items* intel does the same thing. push 1

sum_array.txt
add

# introductory example; finds the sum of the elements of an array .data # start of data segment x: .long 1

wack.c
add

char shellcode[] = "\xbb\x00\x00\x00\x00"
   --->upload your article


User submitted category site links


(None)

-->submit a page from your site dealing with assembler to the sirfsup! web directory for listing

return to top