Linux/x86 - Add Root User (t00r) To /etc/passwd Shellcode (82 bytes)
reference | Linux/x86 - Add Root User (t00r) To /etc/passwd Shellcode (82 bytes) |
1 | global _start |
open(2)
flags O_RDWR
man 2 open
:
The mode argument specifies the file mode bits to be applied when a new file is created. If neither O_CREAT nor O_TMPFILE is specified in flags, then mode is ignored (and can thus be specified as 0, or simply omitted).
1 |
|
seek(2) whence:
- SEEK_SET (0x0)
- SEEK_CUR (0x1)
- SEEK_END (0x2)
1 |
|
Here’s the modified version to just add a newline:
1 | global _start |