8000 GitHub - githublihaha/linux_scan_memory: linux扫描内存,根据/proc/<PID>/maps
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

githublihaha/linux_scan_memory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

搜索linux内存的小脚本

MAX_PID -> /proc/PID/maps -> /proc/PID/mem -> search

用法、效果

直接在命令行运行时输入要查询的字符串

./find_mem.sh --busybox www[.]example.com或者,使用busybox中的命令./find_mem.sh --busybox www[.]example.com

输出:PID、cmdline、exe、PS info、PS Tree信息

image

改进

  • 取消搜索除栈地址之外的高位地址
  • 从当前运行的脚本的PID开始倒序扫描,最小PID>2000,小PID的都是系统进程。
  • 按内存段权限过滤,跳过不可读区域
  • 避免不必要的十六进制与十进制反复转换
  • 如果在本目录下存在busybox,并且指定了--busybox,则使用busybox中的命令,针对系统命令被替换了的场景。但是busybox中的命令的参数支持较少,显示效果不如系统自带的好

参考

https://github.com/Just-Hack-For-Fun/Linux-INCIDENT-RESPONSE-COOKBOOK/releases/tag/v1.9

About

linux扫描内存,根据/proc/<PID>/maps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0