This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* A PTRACE_POKEDATA variant of CVE-2016-5195 | |
* should work on RHEL 5 & 6 | |
* | |
* (un)comment correct payload (x86 or x64)! | |
* $ gcc -pthread c0w.c -o c0w | |
* $ ./c0w | |
* DirtyCow root privilege escalation | |
* Backing up /usr/bin/passwd.. to /tmp/bak | |
* mmap fa65a000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Ubuntu 16.04.4 kernel priv esc | |
* | |
* all credits to @bleidl | |
* - vnik | |
*/ | |
// Tested on: | |
// 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64 | |
// if different kernel adjust CRED offset + check kernel stack size |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# author: thinkycx | |
# update: 20190119 | |
# tested on ubuntu 16.04 docker | |
# quit if the following commands has errors | |
set -e | |
# tools | |
sudo apt-get update && |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# date: 2018-11-02 | |
# author: thinkycx | |
# reference: https://bogdanvlviv.com/posts/tmux/how-to-install-the-latest-tmux-on-ubuntu-16_04.html | |
# test on: ubuntu 16.04 | |
sudo apt install -y automake | |
sudo apt install -y build-essential | |
sudo apt install -y pkg-config | |
sudo apt install -y libevent-dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Based on https://www.openwall.com/lists/oss-security/2018/08/16/1 | |
# untested CVE-2018-10933 | |
''' | |
# fixed - test by thinkycx and | |
Traceback (most recent call last): | |
File "10933.py", line 12, in <module> | |
new_auth_accept = paramiko.auth_handler.AuthHandler._handler_table[paramiko.common.MSG_USERAUTH_SUCCESS] | |
TypeError: 'property' object has no attribute '__getitem__' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# driver: https://github.com/EttusResearch/uhd | |
## http://files.ettus.com/manual/page_install.html | |
## sudo apt-get install libuhd-dev libuhd003 uhd-host | |
## install UHD software as well as allow you to receive package updates. | |
sudo add-apt-repository ppa:ettusresearch/uhd | |
sudo apt-get update | |
sudo apt-get install libuhd-dev libuhd003 uhd-host |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ref: https://jekyllrb.com/docs/installation/ubuntu/ | |
# requirements | |
sudo apt-get install ruby ruby-dev build-essential | |
# env for bash | |
echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc | |
echo 'export GEM_HOME=$HOME/gems' >> ~/.bashrc | |
echo 'export PATH=$HOME/gems/bin:$PATH' >> ~/.bashrc | |
source ~/.bashrc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# author: [email protected] | |
# ref: https://source.android.com/setup/build/initializing | |
# License: Gnu GPL v. 2 | |
# License is same as Linux kernel license, since the code helps compile the AOSP | |
sudo apt-get install apt-transport-https | |
# test date 201711: use for install openjdk on ubuntu14.04 | |
download_old_jdk(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Use to download AOSP kernel build-chains and vendors | |
# vendors needs run by youself | |
# test in ubuntu:14.04 docker, contact me if you need it | |
# author: [email protected] | |
# License: Gnu GPL v. 2 | |
# License is same as Linux kernel license, since the code helps compile the Linux kernel for a device | |
export BASE_FOLDER="/root/AOSP/" | |
export BASE_URL="https://aosp.tuna.tsinghua.edu.cn" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Purpose: Script for building AOSP code and Linux kernel for walleye using open-source toolchains. | |
# Author: [email protected] | |
# License: Gnu GPL v. 2 | |
# License is same as Linux kernel license, since the code helps compile the Linux kernel for a device | |
# Change these directory paths to point to your aosp and NDK folders. | |
# reference: https://www.digitalocean.com/community/tutorials/how-to-build-android-roms-on-ubuntu-16-04 | |
# edited by thinkycx 201809 | |
export KERNEL=/root/AOSP/msm |