Skip to content

Instantly share code, notes, and snippets.

View thinkycx's full-sized avatar
😀

thinkycx thinkycx

😀
View GitHub Profile
@thinkycx
thinkycx / CVE-2017-8890-poc.c
Last active August 12, 2018 13:22
CVE-2017-8890 poc
/*
// modify beraphin CVE-2017-8890.cpp
test on 20180327 @ thinkycx
success
gdb-peda$ c
Continuing.
[ 150.971426] BUG: unable to handle kernel paging request at 000003ff00000505
[ 151.151511] IP: ip_mc_leave_src+0x25/0x90
[ 151.257300] PGD 0
@thinkycx
thinkycx / malloc.c
Last active June 23, 2018 07:11
a copy of glibc2.23 malloc.c
/* Malloc implementation for multiple threads without lock contention.
Copyright (C) 1996-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Wolfram Gloger <wg@malloc.de>
and Doug Lea <dl@cs.oswego.edu>, 2001.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
@thinkycx
thinkycx / start_pwn_with_1script.sh
Last active January 16, 2019 06:41
install softwares for pwn
#!/bin/bash
# maybe need to change pip file
# sudo vim /usr/bin/pip
# ln -s /mnt/hgfs/Pwn ~/pwn
# ln -s ~/pwn ~/Desktop/pwn
other(){
# vim plus
@thinkycx
thinkycx / scanfolder.c
Created June 19, 2018 04:34
Only support to scan folder and regular file.Maybe support symbolic etc in future...
/*
date: 20180619
author: thinkycx
usage: gcc scanfolder.c -o scanfolder
./scanfolder [foldername]
./scscanfolderan /home
Only support to scan folder and regular file.Maybe support symbolic etc in future...
*/
#include <stdio.h>
#include <dirent.h>
@thinkycx
thinkycx / find_files.c
Last active June 19, 2018 03:17
use BFS to traversal folder
#include <stdio.h>
#include <dirent.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <fcntl.h>
#include <arpa/inet.h>
#include <sys/types.h>
@thinkycx
thinkycx / dirty_passwd_adjust_cow.c
Created May 23, 2018 05:32 — forked from ngaro/dirty_passwd_adjust_cow.c
A dirty cow exploit that automatically finds the current user in passwd and changes it's uid to 0
#include <stdio.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <pthread.h>
#include <unistd.h>
#include <sys/stat.h>
#include <string.h>
#include <stdint.h>
#include <stdlib.h>
#include <sys/types.h>
@thinkycx
thinkycx / cowroot.c
Created May 22, 2018 13:51 — 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
@thinkycx
thinkycx / pynotice.py
Last active May 1, 2018 02:11
send you an email after finish the job
#!/usr/bin/env python
# coding=utf-8
# author: thinkycx
# date: 20180430
"""
purpose:
send your an email after finish the job
notice that qq smtp cannot send emails frequently, about 2 times per 10 minutes.
and it's enough!
usage:
@thinkycx
thinkycx / thinkycx-zsh.sh
Last active May 29, 2023 09:41
install zsh with one script ( Ubuntu/CentOS/macOS)
#!/bin/bash
# author: thinkycx
# date: 2018-04-30
# update: 2020-07-07
# 20230520 fix zsh-autosuggestions clone bug
# usage:
# curl -fsSL https://gist.githubusercontent.com/thinkycx/2e21c3572a8d1fde21aad07a58fcf940/raw/ -o zsh.sh && sudo bash zsh.sh
#
# install zsh for one script
# support ubuntu & centos & macOS
@thinkycx
thinkycx / git2.sh
Last active April 24, 2018 13:20
a wrapper of git clone used in vmware shared folders
#!/bin/bash
# author: thinkycx
# date: 2018-04-24
:<<EOF
usage:
alias git2 ~/scripts/git2.sh
git2 clone git://github.com/author/project_name.git [author@project_name]
use it in vmware shared folders which is actually stored on windows