Skip to content

should there be a note for how to do "scan process libs" in checksec.py? #119

@Artoria2e5

Description

@Artoria2e5

It's currently the only stuff checksec.sh has on the chart that this thing does not. And compared to other things it's actually quite easy with a wrapper function in the shell. Not so easy in python though since you got to change the file input bits -- I figured that this could be a reason for not implementing it.

Something like:

scan_proc(){ local pid=$1; shift; sudo checksec /proc/$1/exe "$@"; }
scan_proc_libs(){
   # yes this final expansion is fragile. I don't care
   sudo bash -c '
     pid=$1
     shift
     checksec $(tr -s ' ' < /proc/$pid/maps | cut -d ' ' -f 6 | sort -u | xargs file | grep ELF | cut -d: -f1) "$@"'
} 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions