Skip to content

Get ALL PIDs for a process #4

@B-LUC

Description

@B-LUC

Small change for the detection of a deleted process:

for pn in "${proc_names[@]}"
do
for exe_pid in $(pidof $pn)
do
exe_path=$(ls -l /proc/$exe_pid/exe 2>/dev/null | grep deleted)
if [[ $exe_path ]]
then
malicious_proc=true
echo "[*] Fileless process" $pn "is running on the server."
fi
done
done

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions