Linux
Enumeration
Commands
Directories / Files
Process file (PID) brute-force
The file “/proc//cmdline” serves as a repository for the command-line arguments that have been provided to a specific process identified by its (PID). This allows for enumerating all the running processes based on their PID. This could be well used for exploiting an LFI.
Directory / file copy (symlink)
If there's a directory or a file that is being copied (by some program, perhaps cron), one can either create a symlink or a direct spoof of the actual file so, that the copied item will be spoofed and contain the data the attacker wants.
Clipboard
Look for anything interesting in the clipboard
Interesting groups
Disk group
A user who is in the disk group, will probably have access to info on a given disk.
debugfs
debugfs
let's you debug a file system if you can read the device.
With this, one can read files owned by a given user
Bash file command execution
If a file executes a variable, one might be able to write payload to it.
Example
(program.sh)
The attacker can supply the following payload:
Services
A service is defined by a .service
file. systemctl
is used to link it to systemd
and then used again to start the service.
What the service does is defined by the .service
file.
If a user has access to the systemctl
binary they can make a service which can read file or even spawn a reverse shell.
Raw image file conversion to actual image
Raw image data can be converted to an actual image to reveal its content.
Gimp
Select the file and its type (Raw image data)
Select resolution (
cat /sys/class/graphics/fb0/virtual_size
if unknown)Edit image types
Export as png
Last updated