Skip to content

Instantly share code, notes, and snippets.

@clr2of8
clr2of8 / test.sct
Created September 15, 2022 21:18 — forked from bohops/test.sct
.SCT for testing (++++ @subTee)
<?XML version="1.0"?>
<scriptlet>
<registration
description="Bandit"
progid="Bandit"
version="1.00"
classid="{AAAA1111-0000-0000-0000-0000FEEDACDC}"
>
@clr2of8
clr2of8 / Watch-EventLogTail.ps1
Created September 11, 2022 01:45 — forked from LeeHolmes/Watch-EventLogTail.ps1
Tail an event log through PowerShell
## PowerShell Eventing lets you tail an event log:
## http://powershellcookbook.com/recipe/IMyz/respond-to-automatically-generated-events
$watcher = New-Object System.Diagnostics.Eventing.Reader.EventLogWatcher "Microsoft-Windows-PowerShell/Operational"
Register-ObjectEvent $watcher EventRecordWritten -Action {
$event = $eventArgs.EventRecord
if($event.ProcessId -ne $pid)
{
## Save the last event into a variable in the PowerShell sesssion if you want to explore its properties,
## as the eventing actions run in their own runspace
# $GLOBAL:lastEvent = $event
@clr2of8
clr2of8 / groupenumeration.ps1
Created January 8, 2020 14:59 — forked from joswr1ght/groupenumeration.ps1
Create a Collection of Files for Windows Domain Groups with User Members in Each File
Get-AdGroup -Filter * | % { Get-AdGroupMember $_.Name | Select-Object -ExpandProperty SamAccountName | Out-File -FilePath "$($_.Name).txt" -Encoding ASCII }
@clr2of8
clr2of8 / Various-Macro-Based-RCEs.md
Created March 14, 2019 14:59 — forked from mgeeky/Various-Macro-Based-RCEs.md
Various Visual Basic Macros-based Remote Code Execution techniques to get your meterpreter invoked on the infected machine.

This is a note for myself describing various Visual Basic macros construction strategies that could be used for remote code execution via malicious Document vector. Nothing new or fancy here, just a list of techniques, tools and scripts collected in one place for a quick glimpse of an eye before setting a payload.

All of the below examples had been generated for using as a remote address: 192.168.56.101.

List:

  1. Page substiution macro for luring user to click Enable Content
  2. The Unicorn Powershell based payload