Skip to content

Instantly share code, notes, and snippets.

View t10-13rocket's full-sized avatar
💭
Thought processing.

Amy D. Vining t10-13rocket

💭
Thought processing.
  • Jacksonville, Florida
View GitHub Profile
--- /nix/store/iv6vzkarjpgq6q5r8p8bv3l5caydld1p-vendor-diff/system.upstream 2020-12-18 00:01:28.646412057 +0000
+++ /nix/store/iv6vzkarjpgq6q5r8p8bv3l5caydld1p-vendor-diff/system.built 2020-12-18 00:01:28.653412386 +0000
@@ -45,28 +45,27 @@
sys
system
system/apex
+system/apex/com.android.adbd.apex
system/apex/com.android.apex.cts.shim.apex
system/apex/com.android.art.release.apex
+system/apex/com.android.cellbroadcast.apex
@mike-neko
mike-neko / ViewController.swift
Last active October 11, 2021 00:43
Tessellation in Metal
import UIKit
import MetalKit
class ViewController: UIViewController, MTKViewDelegate {
/// StoryBoardに配置済のMTKView
@IBOutlet weak var mtkView: MTKView!
/// edgeTessellationFactorの設定値
var edgeFactor = Float(2)
/// insideTessellationFactorの設定値
@article{dumoulin2016guide,
title="{A guide to convolution arithmetic for deep learning}",
author = {{Dumoulin}, Vincent and {Visin}, Francesco},
journal = {ArXiv e-prints},
eprint = {1603.07285},
year={2016},
month={mar}
}
@dergachev
dergachev / setuid-root-backdoor.md
Last active May 24, 2024 13:43
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