Skip to content

Instantly share code, notes, and snippets.

View ConnorMcF's full-sized avatar
🥓
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Connor McFarlane ConnorMcF

🥓
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
View GitHub Profile
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active April 19, 2024 12:30
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@MattKetmo
MattKetmo / pwnd.md
Last active April 5, 2023 02:13
pwnd

This list has moved to pwnd.dev

Tools

  • Metaspoit: Penetration testing software
  • GhostShell: Malware indetectable, with AV bypass techniques, anti-disassembly, etc.
  • BeEF: The Browser Exploitation Framework
  • PTF: Penetration Testers Framework
  • Bettercap: MITM framework
  • Nessus: Vulnerability scanner
@dergachev
dergachev / setuid-root-backdoor.md
Last active March 16, 2024 00:49
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

@pitch-gist
pitch-gist / gist:2999707
Created June 26, 2012 22:21
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>