(update): dockerfile, cheatsheet
This commit is contained in:
parent
fe453841be
commit
5e7c7ff277
@ -5,7 +5,6 @@ RUN mkdir /lab
|
|||||||
RUN bash -c "chmod +rwx /lab"
|
RUN bash -c "chmod +rwx /lab"
|
||||||
|
|
||||||
COPY bof.elf /lab/bof.elf
|
COPY bof.elf /lab/bof.elf
|
||||||
COPY bof.s /lab/bof.s
|
|
||||||
|
|
||||||
RUN apt update
|
RUN apt update
|
||||||
RUN DEBIAN_FRONTEND=noninteractive apt upgrade -y
|
RUN DEBIAN_FRONTEND=noninteractive apt upgrade -y
|
||||||
|
@ -40,3 +40,51 @@
|
|||||||
| | | from the current working |
|
| | | from the current working |
|
||||||
| | | directory) file. |
|
| | | directory) file. |
|
||||||
+-------------------------------------------------------------------------------+
|
+-------------------------------------------------------------------------------+
|
||||||
|
|
||||||
|
= DEBUGGER COMMANDS (LLDB)
|
||||||
|
|
||||||
|
+-------------------------------------------------------------------------------+
|
||||||
|
| command | subcommand | modifier | argument | description |
|
||||||
|
+---------------|---------------|---------------|---------------|---------------+
|
||||||
|
| break | set | -a | <address> | set a break- |
|
||||||
|
| | | | | point at an |
|
||||||
|
| | | | | address |
|
||||||
|
+---------------|---------------|---------------|---------------|---------------|
|
||||||
|
| run | | | | run the |
|
||||||
|
| | | | | program |
|
||||||
|
+---------------|---------------|---------------|---------------|---------------+
|
||||||
|
| step | | | | step forward |
|
||||||
|
+---------------|---------------|---------------|---------------|---------------|
|
||||||
|
| disas | | | | disassemble |
|
||||||
|
+---------------|---------------|---------------|---------------|---------------|
|
||||||
|
| x/40xw | | | $<register> | display memory|
|
||||||
|
| | | | | of 40 "words" |
|
||||||
|
| | | | | in hex of a |
|
||||||
|
| | | | | register |
|
||||||
|
+-------------------------------------------------------------------------------+
|
||||||
|
|
||||||
|
= X64 REGISTERS
|
||||||
|
|
||||||
|
+-------------------------------------------------------------------------------+
|
||||||
|
| name | description | subs |
|
||||||
|
+---------------|-----------------------------------------------|---------------+
|
||||||
|
| rax | general purpose, typically return values here | eax,ax,al,ah |
|
||||||
|
+---------------|-----------------------------------------------|---------------+
|
||||||
|
| rbx | base register | ebx,bx,bl,bh |
|
||||||
|
+---------------|-----------------------------------------------|---------------+
|
||||||
|
| rcx | counter register, used in loops to count, etc | ecx,cx,cl,ch |
|
||||||
|
+---------------|-----------------------------------------------|---------------+
|
||||||
|
| rdx | general purpose / data register | edx,dx,dl,dh |
|
||||||
|
+---------------|-----------------------------------------------|---------------+
|
||||||
|
| rsi | source for data copies | esi,si,sl |
|
||||||
|
+---------------|-----------------------------------------------|---------------+
|
||||||
|
| rdi | destination register | edi,di,dl |
|
||||||
|
+---------------|-----------------------------------------------|---------------+
|
||||||
|
| rbp | base pointer, typically resets at frame | ebp,bp,bpl |
|
||||||
|
+---------------|-----------------------------------------------|---------------+
|
||||||
|
| rsp | stack pointer (think: the stack) | esp,sp,spl |
|
||||||
|
+---------------|-----------------------------------------------|---------------+
|
||||||
|
| r8-r15 | general purpose | r8d-r15d, |
|
||||||
|
| | | r8w-r15w, |
|
||||||
|
| | | r8b, r15b |
|
||||||
|
+-------------------------------------------------------------------------------+
|
||||||
|
Loading…
Reference in New Issue
Block a user