Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.9.0 release PR #224

Merged
merged 12 commits into from
Mar 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions config/banner/Munich_Edt-v0.9.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

EMBA version 0.9.0 - Munich Edt.


.----------------. .----------------. .-----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------.
| .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. | | .--------------. || .--------------. || .--------------. || .--------------. |
| | ____ ____ | || | _____ _____ | || | ____ _____ | || | _____ | || | ______ | || | ____ ____ | | | | _________ | || | ________ | || | _________ | || | | |
| ||_ \ / _|| || ||_ _||_ _|| || ||_ \|_ _| | || | |_ _| | || | .' ___ | | || | |_ || _| | | | | |_ ___ | | || | |_ ___ `. | || | | _ _ | | || | | |
| | | \/ | | || | | | | | | || | | \ | | | || | | | | || | / .' \_| | || | | |__| | | | | | | |_ \_| | || | | | `. \ | || | |_/ | | \_| | || | | |
| | | |\ /| | | || | | ' ' | | || | | |\ \| | | || | | | | || | | | | || | | __ | | | | | | _| _ | || | | | | | | || | | | | || | | |
| | _| |_\/_| |_ | || | \ `--' / | || | _| |_\ |_ | || | _| |_ | || | \ `.___.'\ | || | _| | | |_ | | | | _| |___/ | | || | _| |___.' / | || | _| |_ | || | _ | |
| ||_____||_____|| || | `.__.' | || ||_____|\____| | || | |_____| | || | `._____.' | || | |____||____| | | | | |_________| | || | |________.' | || | |_____| | || | (_) | |
| | | || | | || | | || | | || | | || | | | | | | || | | || | | || | | |
| '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' | | '--------------' || '--------------' || '--------------' || '--------------' |
'----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------'


#StandWithUkraine
15 changes: 15 additions & 0 deletions config/banner/code_not_war.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

_..._ .-'''-. .-'''-.
.-'_..._''. ' _ \ _______ ' _ \
__ __ ___ . __.....__ .' .' '.\/ /` '. \\ ___ `'. __.....__ _..._ / /` '. \
| |/ `.' `. .'| .-'' '. / .' . | \ ' ' |--.\ \ .-'' '. .' '. . | \ ' _ _
| .-. .-. ' .' | / .-''"'-. `. . ' | ' | '| | \ ' / .-''"'-. `. . .-. .| ' | ' .| /\ \\ // .-,.--.
| | | | | | __ < | / /________\ \ | | \ \ / / | | | '/ /________\ \ | ' ' |\ \ / / .' |_ `\\ //\\ // __ | .-. |
| | | | | | .:--.'. | | ____| | | | `. ` ..' / | | | || | | | | | `. ` ..' /.' | \`// \'/.:--.'. | | | |
| | | | | |/ | \ | | | \ .'\ .-------------' . ' '-...-'` | | ' .'\ .-------------' | | | | '-...-'`'--. .-' \| |// | \ | | | | |
| | | | | |`" __ | | | |/ . \ '-.____...---. \ '. . | |___.' /' \ '-.____...---. | | | | | | ' `" __ | | | | '-
|__| |__| |__| .'.''| | | /\ \ `. .' '. `._____.-'/ /_______.'/ `. .' | | | | | | .'.''| | | |
/ / | |_| | \ \ `''-...... -' `-.______ / \_______|/ `''-...... -' | | | | | '.' / / | |_| |
\ \._,\ '/' \ \ \ ` | | | | | / \ \._,\ '/|_|
`--' `"'------' '---' '--' '--' `'-' `--' `"

8 changes: 8 additions & 0 deletions config/banner/code_not_war_02.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

_ _ _
/\/\ __ _| | _____ ___ ___ __| | ___ _ __ ___ | |_ __ ____ _ _ __
/ \ / _` | |/ / _ \ / __/ _ \ / _` |/ _ \ | '_ \ / _ \| __| \ \ /\ / / _` | '__|
/ /\/\ \ (_| | < __/ | (_| (_) | (_| | __/ | | | | (_) | |_ \ V V / (_| | |
\/ \/\__,_|_|\_\___| \___\___/ \__,_|\___| |_| |_|\___/ \__| \_/\_/ \__,_|_|


14 changes: 14 additions & 0 deletions config/banner/code_not_war_03.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@


,---. ,---. ____ .--. .--. .-''-. _______ ,-----. ______ .-''-. ,---. .--. ,-----. ,---------. .--. .--. ____ .-------.
| \ / | .' __ `. | | _/ / .'_ _ \ / __ \ .' .-, '. | _ `''. .'_ _ \ | \ | | .' .-, '.\ \ | |_ | | .' __ `. | _ _ \
| , \/ , |/ ' \ \| (`' ) / / ( ` ) ' | ,_/ \__) / ,-.| \ _ \ | _ | ) _ \ / ( ` ) ' | , \ | | / ,-.| \ _ \`--. ,---' | _( )_ | |/ ' \ \| ( ' ) |
| |\_ /| ||___| / ||(_ ()_) . (_ o _) | ,-./ ) ; \ '_ / | :|( ''_' ) |. (_ o _) | | |\_ \| |; \ '_ / | : | \ |(_ o _) | ||___| / ||(_ o _) /
| _( )_/ | | _.-` || (_,_) __ | (_,_)___| \ '_ '`) | _`,/ \ _/ || . (_) `. || (_,_)___| | _( )_\ || _`,/ \ _/ | :_ _: | (_,_) \ | | _.-` || (_,_).' __
| (_ o _) | |.' _ || |\ \ | |' \ .---. > (_) ) __: ( '\_/ \ ;|(_ ._) '' \ .---. | (_ o _) |: ( '\_/ \ ; (_I_) | |/ \| |.' _ || |\ \ | |
| (_,_) | || _( )_ || | \ `' / \ `-' / ( . .-'_/ )\ `"/ \ ) / | (_.\.' / \ `-' / | (_,_)\ | \ `"/ \ ) / (_(=)_) | ' /\ ` || _( )_ || | \ `' /
| | | |\ (_ o _) /| | \ / \ / `-'`-' / '. \_/``".' | .' \ / | | | | '. \_/``".' (_I_) | / \ |\ (_ o _) /| | \ /
'--' '--' '.(_,_).' `--' `'-' `'-..-' `._____.' '-----' '-----'` `'-..-' '--' '--' '-----' '---' `---' `---` '.(_,_).' ''-' `'-'



10 changes: 5 additions & 5 deletions config/bin_version_strings.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ ecmh;;bsd;"Easy\ Cast\ du\ Multi\ Hub\ \(ecmh\)\ [0-9]+\.[0-9]+\.[0-9]+\ by\ Jer
eeprog;;lgpl;"eeprog\ [0-9](\.[0-9]+)+?,\ a\ [0-9]+Cxx\ EEPROM\ reader/writer$";"sed -r 's/\eeprog\ ([0-9](\.[0-9]+)+?),\ .*/eeprog:\1/'";
eglibc;;lgpl;"\(.*\ EGLIBC\ .*\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(.*\ EGLIBC\ .*\)\ ([0-9](\.[0-9]+)+?)$/eglibc:\1/'";
eglibc;;lgpl;"\(EGLIBC\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(EGLIBC\)\ ([0-9](\.[0-9]+)+?)$/eglibc:\1/'";
eject;;unknown;"[Ee]ject\ Version\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/[Ee]ject\ Version\ ([0-9](\.[0-9]+)+?\ .*/eject:\1/'";
elog;;unknown;"event\ log\ utility\ v[0-9](\.[0-9]+)+?";"sed -r 's/event\ log\ utility\ ([0-9](\.[0-9]+)+?.*/elog:\1/'";
eject;;unknown;"[Ee]ject\ Version\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/[Ee]ject\ Version\ ([0-9](\.[0-9]+)+?)\ .*/eject:\1/'";
elog;;unknown;"event\ log\ utility\ v[0-9](\.[0-9]+)+?";"sed -r 's/event\ log\ utility\ v([0-9](\.[0-9]+)+?).*/elog:\1/'";
embedthis;;unknown;"^Embedthis\ Appweb\ [0-9](\.[0-9]+)+?";"sed -r 's/Embedthis\ Appweb\ ([0-9](\.[0-9]+)+?).*/embedthis:appweb:\1/'";
espeakup;;unknown;"ESpeakup\ [0-9](\.[0-9]+)+?$";"sed -r 's/ESpeakup\ ([0-9](\.[0-9]+)+?)$/espeakup:\1/'";
ethswctl.c;;unknown;"^ethswctl\.c:v[0-9](\.[0-9]+)+?";"sed -r 's/ethswctl\.c:v([0-9](\.[0-9]+)+?).*/ethswctl:\1/'";
Expand Down Expand Up @@ -371,7 +371,7 @@ man-db;;unknown;"manpath\ [0-9](\.[0-9]+)+?$";"sed -r 's/manpath\ ([0-9](\.[0-9]
mbim-proxy;;unknown;"^mbim-proxy\ [0-9](\.[0-9]+)+$";"sed -r 's/mbim-proxy\ ([0-9](\.[0-9]+)+?)$/mbim-proxy:\1/'";
mcad;;unknown;"Management\ Console\ Agent\ v[0-9]\.[0-9]+\ \(c\)\ Ubiquiti\ Networks,\ Inc\.$";"sed -r 's/Management\ Console\ Agent\ v([0-9](\.[0-9]+)+?)\ .*/ubiquiti:console_agent:\1/'";
mdadm;;unknown;"^mdadm\ -\ v[0-9](\.[0-9]+)+?\ -\ ";"sed -r 's/mdadm\ -\ v([0-9](\.[0-9]+)+?)\ .*/mdadm:\1/'";
mdns-repeater;;unknown;"mDNS\ repeater\ \(version\ [0-9](\.[0-9]+)+?\)$";"sed -r 's/mDNS\ repeater\ \(version\ ([0-9](\.[0-9]+)+?\)$/mdnsrepeater:\1/'";
mdns-repeater;;unknown;"mDNS\ repeater\ \(version\ [0-9](\.[0-9]+)+?\)$";"sed -r 's/mDNS\ repeater\ \(version\ ([0-9](\.[0-9]+)+?)\)$/mdnsrepeater:\1/'";
memtester;;gpl;"memtester\ version\ [0-4](\.[0-9]+)+?\ ";"sed -r 's/memtester\ version\ ([0-4](\.[0-9]+)+?)\ /memtester:\1/'";
memtester;;proprietary;"memtester\ version\ [5-9](\.[0-9]+)+?\ ";"sed -r 's/memtester\ version\ ([5-9](\.[0-9]+)+?)\ /memtester:\1/'";
midnight_commander;;gplv3;"GNU\ Midnight\ Commander\ [0-9](\.[0-9]+)+?";"sed -r 's/GNU\ Midnight\ Commander\ ([0-9](\.[0-9]+)+?)/gnu:midnight_commander:\1/'";
Expand Down Expand Up @@ -540,7 +540,7 @@ reiserfsck;;unknown;"reiserfsck\ [0-9](\.[0-9]+)+?$";"sed -r 's/reiserfsck\ ([0-
rflow;;unknown;"[0-9]\.[0-9]+\ Copyright\ by\ Nikki\ Chumakov$";"sed -r 's/([0-9](\.[0-9]+)+?)\ Copyright\ by\ Nikki\ Chumakov$/rflow:\1/'";
ripd;;gpl;"^ripd\ version\ [\.0-9]+a?";"sed -r 's/ripd\ version\ ([0-9](\.[0-9]+)+?)/quagga:\1/'";
ripd;;gpl;"^ripd\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/ripd\ version\ ([0-9](\.[0-9]+)+?)$/quagga:\1/'";
ripngd;;gpl;"^ripngd\ version\ [\.0-9]+$";"sed -r 's/ripngd\ version\ ([0-9](\.[0-9]+)+?)$/ripngd:\1/'";
ripngd;;gpl;"^ripngd\ version\ [\.0-9]+$";"sed -r 's/ripngd\ version\ ([0-9](\.[0-9]+)+?)$/quagga:\1/'";
ripngd;;unknown;"^ripngd\ version\ [0-9](\.[0-9]+)+?([a-z])?\ ";"sed -r 's/ripngd\ version\ ([0-9](\.[0-9]+)+?)(([a-z])?)\.*/quagga:\1:\2/'";
rndimage;;unknown;"RNDIMGAE\ v[0-9](\.[0-9]+)+?";"sed -r 's/RNDIMGAE\ v([0-9](\.[0-9]+)+?).*/rndimgae:\1/'";
rngd;;unknown;"^rngd\ [0-9]$";"sed -r 's/rngd\ ([0-9]+)$/rngd:\1/'";
Expand Down Expand Up @@ -700,7 +700,7 @@ eglibc;;lgpl;"\ \(Debian\ EGLIBC\ [0-9](\.[0-9]+)+?-[0-9]\)\ .*\ [0-9]\.[0-9]";"
eglibc;;lgpl;"\(Debian\ EGLIBC\ [0-9](\.[0-9]+)+?-[0-9]\)\ ([0-9](\.[0-9]+)+?).*";"sed -r 's/\(Debian\ EGLIBC\ [0-9](\.[0-9]+)+?-[0-9]+.*\)\ ([0-9](\.[0-9]+)+?)/eglibc:\2/";
zebra;;gpl;"[Zz]ebra\ version\ [0-9](\.[0-9]+)+?([a-z])?";"sed -r 's/[Zz]ebra\ version\ ([0-9](\.[0-9]+)+?([a-z])?)/gnu:zebra:\1/'";
zend-engine;;unknown;"Zend\ Engine\ v[0-9](\.[0-9]+)+?,\ Copyright.*Technologies$";"sed -r 's/Zend\ Engine\ v([0-9](\.[0-9]+)+?).*/zend:engine:\1/'";
zic;;unknown;"zic\.c.*[0-9](\.[0-9]+)+?$";"sed -r 's/.*zic\.c.*([0-9](\.[0-9]+)+?)(([a-z])?)$/zic:\1:\2/'";
#zic;;unknown;"zic\.c.*[0-9](\.[0-9]+)+?$";"sed -r 's/.*zic\.c.*([0-9](\.[0-9]+)+?)(([a-z])?)$/zic:\1:\2/'";
zic;;unknown;"zic\.c.*[0-9](\.[0-9]+)+$";"sed -r 's/.*zic\.c.*([0-9]\.[0-9]+?)$/zic:\1/'";
zipcloack;;unknown;"ZipCloak\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/ZipCloak\ ([0-9](\.[0-9]+)+?)\ /info-zip:zipcloak:\1/'";
zipnote;;unknown;"ZipNote\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/ZipNote\ ([0-9](\.[0-9]+)+?)\ /info-zip:zipnote:\1/'";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

print_output "This module extracts version and license details from the firmware files."
print_output "On Linux based systems all binaries are analysed for version details."
print_output "On Non Linux systems all files are analysed for version details."
3 changes: 3 additions & 0 deletions config/report_templates/S116_qemu_version_detection-pre.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

print_output "This module extracts version and license details from the results of the user-mode emulation module (s116)."
2 changes: 1 addition & 1 deletion config/report_templates/S13_weak_func_check-pre.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

print_output "This module identifies the usage of critical binary functions in firmware."
print_output "This module identifies the usage of critical binary functions in firmware via ${ORANGE}objdump$NC."
print_output "Examples of binary functions are system, strcpy, printf and strcat. These functions are configured in the configuration"
print_output "file config/functions.cfg. The module counts the usages per binary. For strcpy functions it also counts strlen functions"
print_output "right before the strcpy function. Additionally it checks if the binary is a known Linux binary or unknown and probably"
Expand Down
7 changes: 7 additions & 0 deletions config/report_templates/S14_weak_func_radare_check-pre.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

print_output "This module identifies the usage of critical binary functions in firmware via ${ORANGE}radare2$NC."
print_output "Examples of binary functions are system, strcpy, printf and strcat. These functions are configured in the configuration"
print_output "file config/functions.cfg. The module counts the usages per binary. For strcpy functions it also counts strlen functions"
print_output "right before the strcpy function. Additionally it checks if the binary is a known Linux binary or unknown and probably"
print_output "a vendor binary."
4 changes: 4 additions & 0 deletions config/report_templates/S95_interesting_binaries_check-pre.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

print_output "This modules searches for interesting binaries like gcc or gdb. Additionally it also searches binaries that could be useful for post exploitation tasks like wget or ftp."

13 changes: 10 additions & 3 deletions emba.sh
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ main()
export EMBA_COMMAND
EMBA_COMMAND="$(dirname "$0")""/emba.sh ""$*"

while getopts a:A:cdDe:Ef:Fghik:l:m:MN:op:QrsStUxX:Y:WzZ: OPT ; do
while getopts a:bA:cdDe:Ef:Fghik:l:m:MN:op:QrsStUxX:Y:WzZ: OPT ; do
case $OPT in
a)
export ARCH="$OPTARG"
Expand All @@ -291,6 +291,10 @@ main()
export ARCH="$OPTARG"
export ARCH_CHECK=0
;;
b)
banner_printer
exit 0
;;
c)
export CWE_CHECKER=1
;;
Expand Down Expand Up @@ -398,7 +402,10 @@ main()

echo

banner_printer
# print it only once per EMBA run - not again from started container
if [[ $IN_DOCKER -eq 0 ]]; then
banner_printer
fi

if [[ "$UPDATE" -eq 1 ]]; then
print_output "[*] EMBA update starting ..." "no_log"
Expand Down Expand Up @@ -772,7 +779,7 @@ main()
echo
if [[ -d "$LOG_DIR" ]]; then
print_output "[!] Test ended on ""$(date)"" and took about ""$(date -d@$SECONDS -u +%H:%M:%S)"" \\n" "main"
rm -r "$TMP_DIR" 2>/dev/null
rm -r "$TMP_DIR" 2>/dev/null || true
else
print_output "[!] Test ended on ""$(date)"" and took about ""$(date -d@$SECONDS -u +%H:%M:%S)"" \\n" "no_log"
fi
Expand Down
1 change: 1 addition & 0 deletions helpers/helpers_emba_print.sh
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ print_help()
echo -e "$CYAN""-t""$NC"" Activate multi threading (destroys regular console output)"
echo -e "$CYAN""-o""$NC"" Activate online checks (e.g. upload and test with VirusTotal)"
echo -e "$CYAN""-r""$NC"" Remove temporary firmware directory after testing"
echo -e "$CYAN""-b""$NC"" Just print a random banner and exit"
echo -e "\\nModify output"
echo -e "$CYAN""-s""$NC"" Prints only relative paths"
echo -e "$CYAN""-z""$NC"" Adds ANSI color codes to log"
Expand Down
2 changes: 2 additions & 0 deletions installer/IL20_firmae_system_emulator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ IL20_firmae_system_emulator() {

print_file_info "fixImage.sh" "FirmAE fixImage script" "https://raw.githubusercontent.com/pr0v3rbs/FirmAE/master/scripts/fixImage.sh" "external/firmae/scripts/"
print_file_info "preInit.sh" "FirmAE preInit script" "https://github.com/pr0v3rbs/FirmAE/blob/master/scripts/preInit.sh" "external/firmae/scripts/"
print_file_info "network.sh" "FirmAE preInit script" "https://github.com/pr0v3rbs/FirmAE/blob/master/scripts/network.sh" "external/firmae/scripts/"

if [[ "$LIST_DEP" -eq 1 ]] || [[ $DOCKER_SETUP -eq 1 ]] ; then
ANSWER=("n")
Expand Down Expand Up @@ -102,6 +103,7 @@ IL20_firmae_system_emulator() {

download_file "fixImage.sh" "https://raw.githubusercontent.com/pr0v3rbs/FirmAE/master/scripts/fixImage.sh" "external/firmae/scripts/fixImage.sh"
download_file "preInit.sh" "https://github.com/pr0v3rbs/FirmAE/blob/master/scripts/preInit.sh" "external/firmae/scripts/preInit.sh"
download_file "network.sh" "https://raw.githubusercontent.com/pr0v3rbs/FirmAE/master/scripts/network.sh" "external/firmae/scripts/network.sh"

;;
esac
Expand Down
Loading