You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-2
Original file line number
Diff line number
Diff line change
@@ -77,18 +77,25 @@ If you want to customise the arguments, use the `--argv` flag (`-a`):
77
77
$ fee -a "killall sshd" ./busybox > output.py
78
78
```
79
79
80
+
**If you don't wish to include the binary in the generated output**, you can instruct `fee` to generate a script which accepts the ELF from stdin at runtime. For this, use `-` for the filename. You can combine all of these options for clever one-liners:
81
+
```console
82
+
$ ssh user@target "$(fee -c -a "echo hi from stdin" -t "libc" -)"< ./busybox
83
+
84
+
hi from stdin
85
+
```
86
+
80
87
__NB!__ By default, the script parses the encoded ELF's header to determine the target architecture. This is required to use the correct syscall number when calling `memfd_create`. If this fails, you can use the `--target-architecture` (`-t`) flag to explicitly generate a syscall number. Alternatively, you can use the `libc` target to resolve the symbol automatically at runtime, although this only works when generating Python code.
81
88
For more exotic platforms, you should specify the syscall number manually. You need to search for `memfd_create` in your target's architecture's syscall table. This is located in various places in the Linux kernel sources. Just Googling `[architecture] syscall table` is perhaps the easiest. You can then specify the syscall number using the `--syscall` flag (`-s`).
0 commit comments