├── .gitignore └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .DS_Store -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Security Knowledge Structure 2 | 3 | 欢迎大家提交ISSUE和Pull Requests。 4 | 5 | ## 1. 企业安全 6 | 7 | ### 1.1 黑盒扫描 8 | 9 | - [静态xss检测](http://blog.wils0n.cn/archives/160/) 10 | - [对AWVS一次简单分析](http://blog.wils0n.cn/archives/145/) 11 | - [初见Chrome Headless Browser](https://lightless.me/archives/first-glance-at-chrome-headless-browser.html) 12 | - [用phantomJS检测URL重定向](https://joychou.org/web/dom-url-redirect.html) 13 | - [用SlimerJS检测Flash XSS](https://joychou.org/web/Flash-Xss-Dynamic-Detection.html) 14 | 15 | ### 1.2 白盒扫描器 16 | 17 | - [Cobra](https://github.com/FeeiCN/cobra) 18 | 19 | ### 1.3 WAF自建 20 | 21 | - [如何建立云WAF](https://joychou.org/web/how-to-build-cloud-waf.html) 22 | - [如何建立HTTPS的云WAF](https://joychou.org/web/how-to-build-https-cloud-waf.html) 23 | - [ngx_lua_waf](https://github.com/loveshell/ngx_lua_waf) 24 | - [VeryNginx](https://github.com/alexazhou/VeryNginx) 25 | - [lua-resty-waf](https://github.com/p0pr0ck5/lua-resty-waf) 26 | 27 | ### 1.4 堡垒机 28 | 29 | - [jumpserver](https://github.com/jumpserver/jumpserver) 30 | 31 | ### 1.5 HIDS 32 | 33 | - [yulong-hids](https://github.com/ysrc/yulong-hids) 34 | 35 | ### 1.6 子域名爆破 36 | 37 | - [ESD](https://github.com/FeeiCN/ESD) 38 | - [subDomainsBrute](https://github.com/lijiejie/subDomainsBrute) 39 | 40 | ### 1.7 命令监控 41 | 42 | - [Netlink Connector](https://www.ibm.com/developerworks/cn/linux/l-connector/) 43 | - [Netlink(Go版本)](https://github.com/vishvananda/netlink) 44 | - [Linux执行命令监控驱动实现解析](https://mp.weixin.qq.com/s/ntE5FNM8UaXQFC5l4iKUUw) 45 | 46 | ### 1.8 文件监控和同步 47 | 48 | - [lsyncd (文件监控)](https://github.com/axkibe/lsyncd) 49 | 50 | ### 1.9 Java安全开发组件 51 | 52 | - [Trident](https://github.com/JoyChou93/trident) 53 | - [Java安全漏洞及修复代码](https://github.com/JoyChou93/java-sec-code) 54 | 55 | ### 1.10 Github信息泄露监控 56 | 57 | - [GSIL](https://github.com/FeeiCN/GSIL) 58 | - [Hawkeye](https://github.com/0xbug/Hawkeye) 59 | 60 | ### 1.11 解析域名后端IP 61 | 62 | - [Nginx Parser](https://github.com/WhaleShark-Team/nginxparser) 63 | 64 | 65 | ## 2. 运维安全 66 | 67 | ### 2.1 NGINX配置安全 68 | 69 | - [Gixy (一款开源的Nginx配置安全扫描器)](https://github.com/yandex/gixy) 70 | - [三个案例看Nginx配置安全](https://www.leavesongs.com/PENETRATION/nginx-insecure-configuration.html) 71 | - [Nginx Config Security](https://joychou.org/web/nginx-config-security.html) 72 | 73 | ### 2.2 Tomcat配置安全 74 | 75 | - [Tomcat Config Security](https://joychou.org/operations/tomcat-config-security.html) 76 | 77 | ## 3. Backdoor 78 | 79 | ### 3.1 Nginx后门 80 | 81 | - [pwnnginx](https://github.com/t57root/pwnginx) 82 | - [浅谈nginx + lua在安全中的一些应用](https://zhuanlan.zhihu.com/p/21362834) 83 | 84 | 85 | ### 3.2 Webshell 86 | 87 | - [Github上webshell大杂烩](https://github.com/tennc/webshell) 88 | - [入侵分析发现的webshell](https://github.com/JoyChou93/webshell) 89 | 90 | 91 | ### 3.3 Linux SSH 后门 92 | 93 | - [Linux SSH Backdoor](https://joychou.org/hostsec/linux-ssh-backdoor.html) 94 | - [sshLooter(一款Python的PAM后门)](https://github.com/mthbernardes/sshLooter) 95 | - [Pam my Unix](https://github.com/LiGhT1EsS/pam_my_unix) 96 | 97 | ### 3.4 反弹Shell 98 | 99 | - [Linux Crontab定时任务反弹shell的坑](https://joychou.org/hostsec/linux-crontab-rebound-shell-hole.html) 100 | 101 | ### 3.5 清除Linux挖矿后门 102 | 103 | - [Linux Ddos后门清除脚本](https://joychou.org/hostsec/linux-ddos-backdoor-killer-script.html) 104 | - [Kill Ddos Backdoor](https://github.com/JoyChou93/kill_ddos_backdoor) 105 | 106 | 107 | ## 4. WAF Bypass 108 | 109 | - [文件上传和WAF的功与防](https://joychou.org/web/bypass-waf-of-file-upload.html) 110 | - [Nginx Lua WAF通用绕过方法](https://joychou.org/web/nginx-Lua-waf-general-bypass-method.html) 111 | 112 | ### 4.1 菜刀 113 | 114 | - [新版菜刀@20141213一句话不支持php assert分析](https://joychou.org/web/caidao-20141213-does-not-support-php-assert-oneword-backdoor-analysis.html) 115 | - [菜刀连接密码不是可显示字符的一句话](https://joychou.org/web/913.html) 116 | - [花式Bypass安全狗对菜刀特征的拦截规则](https://joychou.org/web/bypass-safedog-blocking-rules-for-chopper.html) 117 | - [定制过狗菜刀](https://joychou.org/web/make-own-chopper-which-can-bypass-dog.html) 118 | - [Cknife (一款开源菜刀)](https://github.com/Chora10/Cknife) 119 | 120 | 121 | ## 5. 主机安全 122 | 123 | ### 5.1 提权 124 | 125 | - [脏牛CVE-2016-5195提权](https://github.com/FireFart/dirtycow/blob/master/dirty.c) 126 | 127 | 128 | ## 6. 前端安全 129 | 130 | - [JavaScript反调试技巧](http://www.freebuf.com/articles/system/163579.html) 131 | - [Devtools detect](https://github.com/sindresorhus/devtools-detect) 132 | - [代码混淆](https://github.com/javascript-obfuscator/javascript-obfuscator) 133 | 134 | 135 | ## 7. 业务安全 136 | 137 | ### 7.1 PC设备指纹 138 | 139 | - [fingerprintjs2](https://github.com/Valve/fingerprintjs2) 140 | - [跨浏览器设备指纹](https://github.com/Song-Li/cross_browser) 141 | - [2.5代指纹追踪技术—跨浏览器指纹识别](https://paper.seebug.org/350/) 142 | 143 | ### 7.2 安全水印 144 | 145 | - [水印开发](https://github.com/saucxs/watermark) 146 | - [水印的攻击与防御](https://joychou.org/business/watermark-security.html) 147 | 148 | 149 | 150 | ## 8. JAVA安全 151 | 152 | 153 | - [find-sec-bug](http://find-sec-bugs.github.io/bugs.htm) 154 | - [Java安全漏洞及修复代码](https://github.com/JoyChou93/java-sec-code) 155 | 156 | 157 | ### 8.1 RASP 158 | 159 | - [OpenRASP](https://github.com/baidu/openrasp) 160 | - [RASP,从 Java 反序列化命令执行说起](https://toutiao.io/posts/4kt0al/preview) 161 | 162 | ### 8.2 Java反序列化 163 | 164 | - [Lib之过?Java反序列化漏洞通用利用分析](https://blog.chaitin.cn/2015-11-11_java_unserialize_rce/) 165 | - [JAVA Apache-CommonsCollections 序列化漏洞分析以及漏洞高级利用](https://www.iswin.org/2015/11/13/Apache-CommonsCollections-Deserialized-Vulnerability/) 166 | - [Java反序列化漏洞-玄铁重剑之CommonsCollection(上)](https://xz.aliyun.com/t/2028) 167 | - [Commons Collections Java反序列化漏洞分析](https://joychou.org/java/commons-collections-java-deserialize-vulnerability-analysis.html) 168 | 169 | ### 8.3 JDWP 170 | 171 | 这个漏洞可能会有意想不到的收获。 172 | 173 | - [Hacking the Java Debug Wire Protocol](http://blog.ioactive.com/2014/04/hacking-java-debug-wire-protocol-or-how.html) 174 | - [Java Debug Remote Code Execution](https://joychou.org/web/Java-Debug-Remote-Code-Execution.html) 175 | - [jdwp-shellifier](https://github.com/IOActive/jdwp-shellifier) 176 | 177 | 178 | ### 8.4 Java SSRF 179 | 180 | - [Java SSRF 漏洞代码](https://github.com/JoyChou93/java-sec-code/blob/master/src/main/java/org/joychou/controller/SSRF.java) 181 | - [SSRF in Java](https://joychou.org/web/javassrf.html) 182 | - [Use DNS Rebinding to Bypass SSRF in JAVA](https://joychou.org/web/use-dnsrebinding-to-bypass-ssrf-in-java.html) 183 | 184 | ### 8.5 Java XXE 185 | 186 | - [Java XXE Vulnerability](https://joychou.org/web/java-xxe-vulnerability.html) 187 | - [Java XXE 漏洞代码](https://github.com/JoyChou93/java-sec-code/blob/master/src/main/java/org/joychou/controller/XMLInjection.java) 188 | 189 | ### 8.6 URL白名单绕过 190 | 191 | - [URL白名单绕过](https://joychou.org/web/url-whitelist-bypass.html) 192 | 193 | 194 | ## 9. PHP安全 195 | 196 | ### 9.1 PHP SSRF 197 | 198 | - [Typecho SSRF漏洞分析和利用](https://joychou.org/web/typecho-ssrf-analysis-and-exploit.html) 199 | - [SSRF in PHP](https://joychou.org/web/phpssrf.html) 200 | 201 | ### 9.2 PHP反序列化 202 | 203 | - [Typecho反序列化漏洞分析](https://joychou.org/web/typecho-unserialize-vulnerability.html) 204 | - [浅谈php反序列化漏洞](https://chybeta.github.io/2017/06/17/%E6%B5%85%E8%B0%88php%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%E6%BC%8F%E6%B4%9E/) 205 | 206 | ## 10. Python安全 207 | 208 | - [Exploit SSTI in Flask/Jinja2](https://joychou.org/web/exploit-ssti-in-flask-jinja2.html) 209 | - [tplmap - SSTI服务端模板注入利用工具](https://github.com/epinna/tplmap) 210 | - [Ptyhon沙盒绕过](https://joychou.org/web/python-sandbox-bypass.html) 211 | - [Python安全代码审计](https://joychou.org/web/python-sec-code-audit.html) 212 | - [Python任意命令执行漏洞修复](https://joychou.org/codesec/fix-python-arbitrary-command-execution-vulnerability.html) 213 | - [从一个CTF题目学习Python沙箱逃逸](https://www.anquanke.com/post/id/85571) 214 | 215 | 216 | ## 11. Lua安全 217 | 218 | - [Nginx Lua Web应用安全](https://joychou.org/web/nginx-lua-web-application-security.html) 219 | 220 | ## 12. Node.js安全 221 | 222 | - [Node.js URL重定向](https://www.npmjs.com/advisories/35) 223 | - [Node.js CVE-2017-14849任意文件读取](https://security.tencent.com/index.php/blog/msg/121) 224 | 225 | ## 13. 漏洞修复 226 | 227 | - [Python任意命令执行漏洞修复](https://joychou.org/codesec/fix-python-arbitrary-command-execution-vulnerability.html) 228 | - [CVE-2016-5195 Dirty Cow漏洞修复](https://www.digitalocean.com/community/tutorials/how-to-protect-your-server-against-the-dirty-cow-linux-vulnerability) 229 | 230 | 231 | ## 14. 黑科技 232 | 233 | - [Mysql任意文件读取](https://lightless.me/archives/read-mysql-client-file.html) 234 | 235 | ## 15. 基本技能 236 | 237 | - Linux RPM理解及使用 238 | - PIP理解及使用 239 | - Python、PHP、Java、Bash 240 | - iptables、定时任务、反弹shell 241 | - 正向和反向代理 242 | - Nginx使用及配置 243 | - 域名配置 244 | - TCP/IP、HTTP协议 245 | - BurpSuite工具使用 246 | 247 | ## 16. 安全面试问题 248 | 249 | >面试的问题跟自己简历相关,只是面试官会根据你回答的点继续深挖,看看你有没有回答他想要的答案。 250 | 251 | ### 16.1 甲方 252 | 253 | #### 16.1.1 技术 254 | 255 | 基础 256 | 257 | - 服务器的Web目录发现一个一句话webshell后门,如何排查入侵原因、后门如何清除以及排查数据是否有泄露? 258 | - XXE常用payload 259 | - DDOS如何人工防御? 260 | - 邮件伪造如何防御? 261 | - 拿到WEBSHELL,无法提权,还有什么思路? 262 | - Linux服务器中了DDOS木马,如何使用系统自带命令清除木马? 263 | - Linux服务器被抓鸡后的入侵原因检测思路? 264 | - Webshell检测有什么方法? 265 | - 静态文本匹配,存在误报和漏洞 266 | - 动态hook,但要运行php代码,存在风险 267 | - D盾的方式 268 | - AST 269 | - 离线大数据算法 270 | - Redis未授权访问漏洞的修复方式有哪些?入侵方式有哪些? 271 | - 简述JSON劫持原理以及利用方式? 272 | - SSRF一般如何利用和修复? 273 | - 入侵分析和应急响应一般如何操作? 274 | - XSS(反射、dom)黑盒方式一般如何检测? 275 | - 动态检测Webshell存在什么弊端和安全风险? 276 | - 新应用上线的安全流程? 277 | 1. 应用设计阶段 - 整个架构、逻辑、框架的安全评估 278 | 2. 应用开发阶段 - 提供安全相关组件 279 | 3. 应用测试阶段 - 进行黑盒和白盒安全测试 280 | 4. 应用上线阶段 - 外部SRC、日常黑白盒安全测试以及主机等监控等 281 | - 在PHP中,LFI如何转变为RCE? 282 | - CSRF漏洞一般出现在什么接口?并简述下原理以及修复方式。 283 | - CORS绕过有什么风险,有什么利用场景? 284 | - URL常见的绕过方式? 285 | - 哪些漏洞WAF不好拦截? 286 | - JDWP这种非HTTP协议请求(主机WAF另说) 287 | - CSRF、JSONP、CORS绕过等Referer绕过的漏洞 288 | - 未授权、匿名访问、弱口令等主机漏洞 289 | - URL跳转 290 | - 信息泄露 291 | - SSRF利用http、file协议的攻击 292 | - CSRF Token防御方式的整个流程?前后端分离和不分离防御有什么不同? 293 | - WAF漏报如何统计? 294 | 295 | 深入 296 | 297 | - SDL流程 298 | - 挖过哪些牛逼的、有意思的漏洞? 299 | - 安全如何闭环? 300 | - 越权有什么检测方式? 301 | - 黑盒两个账户Cookie 302 | - 鉴权函数 + 数据库查询 303 | - 类似JDWP这种传统HTTP层WAF不能拦截,可以如何检测? 304 | - RASP 305 | - 命令监控(父进程是Java,并且执行了恶意命令) 306 | - Java反序列化如何检测和防御? 307 | - HTTP请求日志和数据库日志都有的情况下,如何检测存储型XSS? 308 | - 只要数据库存在未编码、过滤的xss payload其实已经存在存储型XSS了,HTTP请求日志作用不是很大。 309 | - 如何判断WAF拦截的攻击请求中,哪些请求是人为请求,哪些是扫描器请求? 310 | 311 | #### 16.1.2 非技术 312 | 313 | - 觉得自己哪方面比较牛逼 314 | - 为什么离开之前公司 315 | - 在之前公司的成长 316 | - 工作成就感 317 | - 做的最大、最牛逼的项目 318 | - 对未来规划是什么 319 | - 安全培训怎样衡量价值? 320 | - 后面安全的方向是什么? 321 | - 对自己在安全的定位是什么? 322 | --------------------------------------------------------------------------------