Skip to content

Instantly share code, notes, and snippets.

Diogo Mónica diogomonica

Block or report user

Report or block diogomonica

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:c6fc308b03cb9a3b719242789c52c161
root@vultr:/var/lib/docker/swarm/certificates# openssl x509 -in swarm-node.crt -text
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
10:79:9c:09:dc:d2:c6:f3:c7:b7:40:bc:1e:c5:0c:d1:08:ae:63:90
Signature Algorithm: ecdsa-with-SHA256
Issuer: CN=swarm-ca
Validity
Not Before: Apr 28 15:56:00 2017 GMT
View memory_bomb.c
int main()
{
while(1)
{
void *m = malloc(1024*1024);
memset(m,0,1024*1024);
}
return 0;
}
View demotamper
#! /bin/bash
hash="$(cat `grep -rl '"name": "demo"' /var/lib/registry/docker/registry/v2/` | grep Sum | head -n1 | cut -d':' -f3 | cut -d'"' -f1)"
firstchars="$(echo $hash | head -c 2)"
data="/var/lib/registry/docker/registry/v2/blobs/sha256/$firstchars/$hash/"
echo $data
View tamperdir.sh
#! /bin/bash
hash="$(cat `grep -rl '"name": "dolly"' /var/lib/registry/docker/registry/v2/` | grep Sum | head -n1 | cut -d':' -f3 | cut -d'"' -f1)"
firstchars="$(echo $hash | head -c 2)"
data="/var/lib/registry/docker/registry/v2/blobs/sha256/$firstchars/$hash/"
echo $data
View gist:e1bcd7ee98ca2bfe6995
#! /bin/bash
echo -e "\e[0;31m# Hacking the Dolly application...\e[0m"
sleep 1
echo -e "# finding location of files... FOUND."
sleep 1
echo -e "\e[0;31m# HACKED, have fun.\e[0m"
rsync -a /var/lib/registry/docker/registry/v2/repositories/dolly_malicious/ /var/lib/registry/docker/registry/v2/repositories/dolly/
View gist:253f494e8df91477a0ba
#! /bin/bash
echo "# Hacking..."
rsync -a /var/lib/registry/docker/registry/v2/repositories/demo_malicious/ /var/lib/registry/docker/registry/v2/repositories/demo/
View demo_script.sh
#!/bin/bash
echo -e "\e[0;34m Starting Setec Astronomy... "
echo -e "\e[0;34m Checking for configuration parameters:"
echo -e "# Loading MD5 hashing algorithm... \e[0;32mDone. "
echo -e "# Seeding randomness using Dual_EC_DRBG... \e[0;32mDone."
echo -e "# Enabling DNSSEC... \e[0;31mFail.\e[0m"
echo "# Starting secret decryption using AES-ECB:"
echo "- Martin"
echo "- Bishop"
View hsmtest.go
package main
import (
"fmt"
"github.com/miekg/pkcs11"
)
func main() {
p := pkcs11.New("/usr/local/lib/softhsm/libsofthsm2.so")
View hsmtest.go
package main
import (
"fmt"
"github.com/miekg/pkcs11"
)
func main() {
p := pkcs11.New("/usr/local/lib/softhsm/libsofthsm2.so")
You can’t perform that action at this time.