Skip to content

Instantly share code, notes, and snippets.

View knqyf263's full-sized avatar

Teppei Fukuda knqyf263

View GitHub Profile
@knqyf263
knqyf263 / pet-snippet.toml
Last active March 12, 2017 09:08
description
[[snippets]]
description = "Create a .keep file in all empty directories"
command = "find . -type d -empty -print0 | xargs -0 -I % touch %/.keep"
[[snippets]]
description = "Display all listen port"
command = "lsof -Pan -i tcp -i udp"
[[snippets]]
description = "Process with the largest memory usage"
@knqyf263
knqyf263 / Makefile
Last active August 23, 2017 05:10
LKM rootkit
KERNDIR := /lib/modules/`uname -r`/build
BUILD_DIR := $(shell pwd)
VERBOSE = 0
obj-m := syscall_replace.o
smallmod-objs := syscall_replace.o
all:
bash set_syscall_table_address.sh
make -C $(KERNDIR) SUBDIRS=$(BUILD_DIR) KBUILD_VERBOSE=$(VERBOSE) modules
@knqyf263
knqyf263 / client.rb
Last active August 29, 2015 14:24
Alternative chains certificate forgery(CVE-2015-1793)
require 'net/https'
https = Net::HTTP.new('bad', 12345)
https.use_ssl = true
https.verify_mode = OpenSSL::SSL::VERIFY_PEER
https.ca_file = 'certs/roots.pem'
https.start { |h|
response = h.get("/")
puts response.body
}