Skip to content

Instantly share code, notes, and snippets.

View mudongliang's full-sized avatar
😁
Faculty at HUST

Dongliang Mu mudongliang

😁
Faculty at HUST
View GitHub Profile
markdown file name: Booting
markdown file name: Booting/README.md
https://github.com/xinqiu : Success
https://github.com/0xAX/linux-insides/commit/527b2b8921c3d9c043bd914c5990d6a991e3035b : Success
markdown file name: Booting/linux-bootstrap-1.md
https://github.com/hailincai : Success
markdown file name: Booting/linux-bootstrap-2.md
markdown file name: Booting/linux-bootstrap-3.md
markdown file name: Booting/linux-bootstrap-4.md
https://github.com/zmj1316 : Success
# -*- coding: utf-8 -*-
from pycountry import countries
from collections import OrderedDict
COUNTRIES_LIST = [
("AF", "Afghanistan"),
("AX", "Åland Islands"),
("AL", "Albania"),
("DZ", "Algeria"),
import pycountry
import json
def check_iso_standard(src):
for college in src:
#print(college["alpha_two_code"])
#print(college["country"])
alpha2 = college["alpha_two_code"]
name = college["country"]
result = pycountry.countries.get(alpha_2=alpha2)
@mudongliang
mudongliang / setuid-root-backdoor.md
Last active August 11, 2023 08:23 — forked from dergachev/setuid-root-backdoor.md
How to use setuid to install a root backdoor.

Why You Can't Un-Root a Compromised Machine

Let's say somebody temporarily got root access to your system, whether because you "temporarily" gave them sudo rights, they guessed your password, or any other way. Even if you can disable their original method of accessing root, there's an infinite number of dirty tricks they can use to easily get it back in the future.

While the obvious tricks are easy to spot, like adding an entry to /root/.ssh/authorized_keys, or creating a new user, potentially via running malware, or via a cron job. I recently came across a rather subtle one that doesn't require changing any code, but instead exploits a standard feature of Linux user permissions system called setuid to subtly allow them to execute a root shell from any user account from the system (including www-data, which you might not even know if compromised).

If the "setuid bit" (or flag, or permission mode) is set for executable, the operating system will run not as the cur

@mudongliang
mudongliang / Explanation of execprog.md
Last active May 10, 2023 07:50
Some explanation of main syzkaller logic, execprog, syz-repro

Explanation of execprog

All the code in the following is in the version : dce6e62ffce4b315ab41407813f0257ced29903f

execprog.go

First, options of syz-execprog are from three go files: exeprog.go, ipcconfig.go, log.go.

var (
	flagOS = flag.String("os", runtime.GOOS, "target os")
	flagArch = flag.String("arch", runtime.GOARCH, "target arch")
	flagCoverFile = flag.String("coverfile", "", "write coverage to the file")
@mudongliang
mudongliang / template.py
Last active April 17, 2020 20:45
Template for my python Script
#!/usr/bin/env python
"""
A simple python script template.
"""
from __future__ import print_function
import os
import sys
import argparse
@mudongliang
mudongliang / template.sh
Last active November 9, 2021 07:17
Shell Template
#!/bin/bash
for dir in `ls`
do
echo $dir
#if [ -d $dir ];then
# cd $dir; XXX ; cd ..
#fi
done