where is web path

where is web path (from wooyun zone)

1
2
3
4
5
6
find / -name "*.php"
find . -name "*.类型" | xargs grep "关键字"
find / -name nginx.conf
find / -name httpd.conf
find robots.txt
locate robots.txt
1
2
3
4
5
.bash_history
httpd,nginx,tomcat,jboss的error_log
/proc/self/cmdline
/proc/self/maps
web容器路径-->配置文件
1
2
win: findstr /s /i /n /d:C:\ "htmlString" *.*
linux: find / -name "*.*" | xargs grep "htmlString"
1
cat /etc/nginx/conf/vhost/web.conf | grep root
1
echo "-----------------------start---------------------";find /etc -maxdepth 3 -name "*" 2>&1|xargs grep -s -i 'root /'| grep -s -i 'nginx\|apache';echo "-----------------------done----------------------"
1
2
For I in (curl http://localhost |grep -oP ([a-Z]{1-6})[\.js]));do for d in $(find / -name "*.js");do grep $i $d;done;done
没实验,意思是打开首页匹配js文件。系统内搜索所有文件js文件,匹配js文件名
1
2
3
4
5
6
win:
wmic datafile where "filename='123' and extension='avi'" get caption
dir /s/a-d/b d:\*重复度较低的文件名(支持通配符)*
where /r c: *.php
1
2
3
history | grep cd | grep -v grep | grep -E 'www|html|nginx|apache|php|lighttp|web' -i
history | grep -E 'cd|vi|ed|nano|et|mkdir|rm|find|ls|mv' | grep -v grep | grep -E 'www|html|nginx|apache|php|lighttp|web' -i
1
2
3
4
5
6
7
8
9
1、netstat -anp | grep [port] --> PID
2、ps -p [PID] -o cmd ww --> PID对应的启动命令(假设存在反向代理,则为bin目录)
3、cd ../conf --> 寻找nginx.conf/httpd.conf
4、通过反向代理ProxyPass/ProxyPassReverse找到对应的webapp端口号port2
5、netstat -anp | grep [port2] --> PID2(web app的进程)
6、ps -p [PID2] -o cmd ww --> PID2的“Catalina.base”
7、cd 到“Catalina.base” --> server.xml
8、从server.xml中找到appBase 和 docBase
9、cd 到 $docBase/$appBase,即为当前web app路径。