File tree Expand file tree Collapse file tree 5 files changed +17
-9
lines changed Expand file tree Collapse file tree 5 files changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -230,6 +230,7 @@ set_log_paths() {
230
230
export S95_LOG=" ${LOG_DIR} /s95_interesting_files_check.txt"
231
231
export S107_LOG=" ${LOG_DIR} /s107_deep_password_search.txt"
232
232
export S108_LOG=" ${LOG_DIR} /s108_stacs_password_search.txt"
233
+ export S108_CSV_LOG=" ${CSV_DIR} /s108_stacs_password_search.csv"
233
234
export S109_LOG=" ${LOG_DIR} /s109_jtr_local_pw_cracking.txt"
234
235
export S110_LOG=" ${LOG_DIR} /s110_yara_check.txt"
235
236
export S116_CSV_LOG=" ${CSV_DIR} /s116_qemu_version_detection.csv"
Original file line number Diff line number Diff line change @@ -1132,7 +1132,6 @@ cve_extractor() {
1132
1132
1133
1133
# normally we only print the number of CVEs. If we have verified CVEs in the Linux Kernel or BusyBox we also add this detail
1134
1134
local lCVEs=" ${lCVE_COUNTER_VERSION} "
1135
- print_output " [!] BINARY: ${lBINARY} / lKERNEL_VERIFIED_VULN: ${lKERNEL_VERIFIED_VULN} "
1136
1135
if [[ " ${lKERNEL_VERIFIED_VULN} " -gt 0 ]] && [[ " ${lBINARY} " == * " kernel" * ]]; then
1137
1136
lCVEs+=" (${lKERNEL_VERIFIED_VULN} )"
1138
1137
fi
Original file line number Diff line number Diff line change @@ -1090,7 +1090,7 @@ print_os() {
1090
1090
print_output " [+] Operating system detected (" " ${ORANGE} " " verified${GREEN} ): ${ORANGE}${lSYSTEM}${NC} "
1091
1091
if [[ " ${VERIFIED_S03} " -eq 1 ]]; then
1092
1092
write_link " s03"
1093
- elif [[ -f " ${S24_LOG} " ]]; then
1093
+ elif [[ -s " ${S24_LOG} " ]] && ! (grep -q " nothing reported " " ${S24_LOG} " ) ; then
1094
1094
write_link " s24"
1095
1095
else
1096
1096
write_link " s25"
Original file line number Diff line number Diff line change @@ -132,11 +132,15 @@ set_p02_default_exports() {
132
132
133
133
generate_entropy_graph () {
134
134
local lFIRMWARE_PATH_BIN=" ${1:- } "
135
+ local lENTROPY_PIC_PATH=" ${LOG_DIR} /firmware_entropy.png"
135
136
136
137
# we use the original FIRMWARE_PATH for entropy testing, just if it is a file
137
- if [[ -f " ${lFIRMWARE_PATH_BIN} " ]] && ! [[ -f " ${LOG_DIR} " /firmware_entropy.png ]]; then
138
+ if [[ -f " ${lFIRMWARE_PATH_BIN} " ]] && ! [[ -f " ${lENTROPY_PIC_PATH} " ]]; then
138
139
print_output " [*] Entropy testing with binwalk ... "
139
- print_output " $( " ${BINWALK_BIN[@]} " -E -p " ${LOG_DIR} " /firmware_entropy.png " ${lFIRMWARE_PATH_BIN} " ) "
140
+ print_output " $( " ${BINWALK_BIN[@]} " -E -p " ${lENTROPY_PIC_PATH} " " ${lFIRMWARE_PATH_BIN} " ) "
141
+ if [[ -s " ${lENTROPY_PIC_PATH} " ]]; then
142
+ write_link " ${lENTROPY_PIC_PATH} "
143
+ fi
140
144
fi
141
145
}
142
146
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ S108_stacs_password_search()
31
31
local lPW_HASH=" "
32
32
local lPW_HASH_REAL=" "
33
33
local lMESSAGE=" "
34
+ local lHASHES_FOUND=0
34
35
35
36
if command -v stacs > /dev/null ; then
36
37
stacs --skip-unprocessable --rule-pack " ${lSTACS_RULES_DIR} " /credential.json " ${FIRMWARE_PATH} " 2> " ${TMP_DIR} " /stacs.err 1> " ${lSTACS_LOG_FILE} " || true
@@ -57,16 +58,19 @@ S108_stacs_password_search()
57
58
lPW_HASH_REAL=$( jq " .runs[0] .results[${ELEMENT} ] .locations[] .physicalLocation[].snippet.text" " ${lSTACS_LOG_FILE} " \
58
59
| grep -v null | head -2 | tail -1 | sed ' s/\\n//g' | tr -d ' [:blank:]' || true)
59
60
60
- print_output " [+] PATH: ${ORANGE} /${lPW_PATH}${GREEN} \t-\tHash: ${ORANGE}${lPW_HASH}${GREEN} ."
61
- write_csv_log " ${lMESSAGE} " " /${lPW_PATH} " " ${lPW_HASH} " " ${lPW_HASH_REAL} "
61
+ if [[ -s " ${S108_CSV_LOG} " ]] && ! (grep -q " /${lPW_PATH} ;${lPW_HASH} " " ${S108_CSV_LOG} " ); then
62
+ print_output " [+] PATH: ${ORANGE} /${lPW_PATH}${GREEN} \t-\tHash: ${ORANGE}${lPW_HASH}${GREEN} ."
63
+ write_csv_log " ${lMESSAGE} " " /${lPW_PATH} " " ${lPW_HASH} " " ${lPW_HASH_REAL} "
64
+ lHASHES_FOUND=$(( lHASHES_FOUND+ 1 ))
65
+ fi
62
66
done
63
67
64
68
print_ln
65
- print_output " [*] Found ${ORANGE}${lELEMENTS_ }${NC} password hashes."
69
+ print_output " [*] Found ${ORANGE}${lHASHES_FOUND }${NC} password hashes."
66
70
fi
67
71
write_log " "
68
- write_log " [*] Statistics:${lELEMENTS_ } "
72
+ write_log " [*] Statistics:${lHASHES_FOUND } "
69
73
fi
70
74
71
- module_end_log " ${FUNCNAME[0]} " " ${lELEMENTS_ } "
75
+ module_end_log " ${FUNCNAME[0]} " " ${lHASHES_FOUND } "
72
76
}
You can’t perform that action at this time.
0 commit comments