diff --git a/build_lists/sensitive_files.yaml b/build_lists/sensitive_files.yaml index c725659..6fa6ea3 100644 --- a/build_lists/sensitive_files.yaml +++ b/build_lists/sensitive_files.yaml @@ -2188,6 +2188,19 @@ search: type: f search_in: - common + + - name: Pre-Shared Keys + value: + config: + auto_check: True + + files: + - name: "*.psk" + value: + just_list_file: True + type: f + search_in: + - common - name: Pass Store Directories value: diff --git a/linPEAS/builder/linpeas_parts/3_available_software.sh b/linPEAS/builder/linpeas_parts/3_available_software.sh deleted file mode 100644 index 3dce09d..0000000 --- a/linPEAS/builder/linpeas_parts/3_available_software.sh +++ /dev/null @@ -1,40 +0,0 @@ -########################################### -#---------) Available Software (----------# -########################################### - -#-- 1AS) Useful software -print_2title "Useful software" -for tool in $USEFUL_SOFTWARE; do command -v "$tool"; done -echo "" - -#-- 2AS) Search for compilers -print_2title "Installed Compilers" -(dpkg --list 2>/dev/null | grep "compiler" | grep -v "decompiler\|lib" 2>/dev/null || yum list installed 'gcc*' 2>/dev/null | grep gcc 2>/dev/null; command -v gcc g++ 2>/dev/null || locate -r "/gcc[0-9\.-]\+$" 2>/dev/null | grep -v "/doc/"); -echo "" - -if [ "$(command -v pkg 2>/dev/null)" ]; then - print_2title "Vulnerable Packages" - pkg audit -F | sed -${E} "s,vulnerable,${SED_RED},g" - echo "" -fi - -if [ "$(command -v brew 2>/dev/null)" ]; then - print_2title "Brew Installed Packages" - brew list - echo "" -fi - -if [ "$MACPEAS" ]; then - print_2title "Writable Installed Applications" - system_profiler SPApplicationsDataType | grep "Location:" | cut -d ":" -f 2 | cut -c2- | while read f; do - if [ -w "$f" ]; then - echo "$f is writable" | sed -${E} "s,.*,${SED_RED},g" - fi - done - - system_profiler SPFrameworksDataType | grep "Location:" | cut -d ":" -f 2 | cut -c2- | while read f; do - if [ -w "$f" ]; then - echo "$f is writable" | sed -${E} "s,.*,${SED_RED},g" - fi - done -fi \ No newline at end of file diff --git a/linPEAS/builder/linpeas_parts/4_procs_crons_timers_srvcs_sockets.sh b/linPEAS/builder/linpeas_parts/3_procs_crons_timers_srvcs_sockets.sh similarity index 100% rename from linPEAS/builder/linpeas_parts/4_procs_crons_timers_srvcs_sockets.sh rename to linPEAS/builder/linpeas_parts/3_procs_crons_timers_srvcs_sockets.sh diff --git a/linPEAS/builder/linpeas_parts/5_network_information.sh b/linPEAS/builder/linpeas_parts/4_network_information.sh similarity index 100% rename from linPEAS/builder/linpeas_parts/5_network_information.sh rename to linPEAS/builder/linpeas_parts/4_network_information.sh diff --git a/linPEAS/builder/linpeas_parts/6_users_information.sh b/linPEAS/builder/linpeas_parts/5_users_information.sh similarity index 100% rename from linPEAS/builder/linpeas_parts/6_users_information.sh rename to linPEAS/builder/linpeas_parts/5_users_information.sh diff --git a/linPEAS/builder/linpeas_parts/7_software_information.sh b/linPEAS/builder/linpeas_parts/6_software_information.sh similarity index 94% rename from linPEAS/builder/linpeas_parts/7_software_information.sh rename to linPEAS/builder/linpeas_parts/6_software_information.sh index 7d09932..f600435 100644 --- a/linPEAS/builder/linpeas_parts/7_software_information.sh +++ b/linPEAS/builder/linpeas_parts/6_software_information.sh @@ -2,6 +2,43 @@ #--------) Software Information (---------# ########################################### +#-- SI) Useful software +print_2title "Useful software" +for tool in $USEFUL_SOFTWARE; do command -v "$tool"; done +echo "" + +#-- SI) Search for compilers +print_2title "Installed Compilers" +(dpkg --list 2>/dev/null | grep "compiler" | grep -v "decompiler\|lib" 2>/dev/null || yum list installed 'gcc*' 2>/dev/null | grep gcc 2>/dev/null; command -v gcc g++ 2>/dev/null || locate -r "/gcc[0-9\.-]\+$" 2>/dev/null | grep -v "/doc/"); +echo "" + +if [ "$(command -v pkg 2>/dev/null)" ]; then + print_2title "Vulnerable Packages" + pkg audit -F | sed -${E} "s,vulnerable,${SED_RED},g" + echo "" +fi + +if [ "$(command -v brew 2>/dev/null)" ]; then + print_2title "Brew Installed Packages" + brew list + echo "" +fi + +if [ "$MACPEAS" ]; then + print_2title "Writable Installed Applications" + system_profiler SPApplicationsDataType | grep "Location:" | cut -d ":" -f 2 | cut -c2- | while read f; do + if [ -w "$f" ]; then + echo "$f is writable" | sed -${E} "s,.*,${SED_RED},g" + fi + done + + system_profiler SPFrameworksDataType | grep "Location:" | cut -d ":" -f 2 | cut -c2- | while read f; do + if [ -w "$f" ]; then + echo "$f is writable" | sed -${E} "s,.*,${SED_RED},g" + fi + done +fi + #-- SI) Mysql version if [ "$(command -v mysql)" ] || [ "$(command -v mysqladmin)" ] || [ "$VERBOSE" ]; then print_2title "MySQL version" diff --git a/linPEAS/builder/linpeas_parts/8_interesting_files.sh b/linPEAS/builder/linpeas_parts/7_interesting_files.sh similarity index 100% rename from linPEAS/builder/linpeas_parts/8_interesting_files.sh rename to linPEAS/builder/linpeas_parts/7_interesting_files.sh diff --git a/linPEAS/builder/linpeas_parts/linpeas_base.sh b/linPEAS/builder/linpeas_parts/linpeas_base.sh index f477d54..cc14775 100755 --- a/linPEAS/builder/linpeas_parts/linpeas_base.sh +++ b/linPEAS/builder/linpeas_parts/linpeas_base.sh @@ -951,7 +951,7 @@ elif [ "$IP" ]; then fi -if echo $CHECKS | grep -q ProCronSrvcsTmrsSocks || echo $CHECKS | grep -q IntFiles || echo $CHECKS | grep -q SofI; then +if echo $CHECKS | grep -q procs_crons_timers_srvcs_sockets || echo $CHECKS | grep -q software_information || echo $CHECKS | grep -q interesting_files; then ########################################### #----------) Caching Finds (--------------# ########################################### diff --git a/linPEAS/builder/src/yamlGlobals.py b/linPEAS/builder/src/yamlGlobals.py index b319030..dffab48 100644 --- a/linPEAS/builder/src/yamlGlobals.py +++ b/linPEAS/builder/src/yamlGlobals.py @@ -15,35 +15,30 @@ LINPEAS_PARTS = [ "name_check": "container", "file_path": LINPEAS_BASE_PARTS + "/2_container.sh" }, - { - "name": "Available Software", - "name_check": "available_software", - "file_path": LINPEAS_BASE_PARTS + "/3_available_software.sh" - }, { "name": "Processes, Crons, Timers, Services and Sockets", "name_check": "procs_crons_timers_srvcs_sockets", - "file_path": LINPEAS_BASE_PARTS + "/4_procs_crons_timers_srvcs_sockets.sh" + "file_path": LINPEAS_BASE_PARTS + "/3_procs_crons_timers_srvcs_sockets.sh" }, { "name": "Network Information", "name_check": "network_information", - "file_path": LINPEAS_BASE_PARTS + "/5_network_information.sh" + "file_path": LINPEAS_BASE_PARTS + "/4_network_information.sh" }, { "name": "Users Information", "name_check": "users_information", - "file_path": LINPEAS_BASE_PARTS + "/6_users_information.sh" + "file_path": LINPEAS_BASE_PARTS + "/5_users_information.sh" }, { "name": "Software Information", "name_check": "software_information", - "file_path": LINPEAS_BASE_PARTS + "/7_software_information.sh" + "file_path": LINPEAS_BASE_PARTS + "/6_software_information.sh" }, { "name": "Interesting Files", "name_check": "interesting_files", - "file_path": LINPEAS_BASE_PARTS + "/8_interesting_files.sh" + "file_path": LINPEAS_BASE_PARTS + "/7_interesting_files.sh" } ]