Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs24-24fa
adventure
Commits
abdb8d89
Commit
abdb8d89
authored
4 years ago
by
Adam Blank
Browse files
Options
Download
Email Patches
Plain Diff
Update stage3.py
parent
7924d372
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
stage3.py
+4
-1
stage3.py
with
4 additions
and
1 deletion
+4
-1
stage3.py
View file @
abdb8d89
...
...
@@ -22,7 +22,10 @@ ADDRESS = to_bytes(0xdeadbeef)
USER
=
b
"FILL ME IN"
PASSWORD
=
b
"FILL ME IN"
SCRIPT
=
[
b
"/bin/sh
\x00
"
,
b
"-c
\x00
"
,
b
"echo -n
\"
"
+
USER
+
b
"
\"
| sha384sum > /hackme/tiny/tokens/"
+
PASSWORD
+
b
"
\x00
"
,
b
"
\x00
"
]
# These are the arguments that make up the shell script we want to execve.
# Don't forget that there needs to be a NULL pointer as the last argument in addition to these!
SCRIPT
=
[
b
"/bin/sh
\x00
"
,
b
"-c
\x00
"
,
b
"echo -n
\"
"
+
USER
+
b
"
\"
| sha384sum > /hackme/tiny/tokens/"
+
PASSWORD
+
b
"
\x00
"
]
# The "exploit string" is what we send in as the headers
HEADERS
=
PADDING
+
ADDRESS
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help