Skip to content

Instantly share code, notes, and snippets.

View trackd's full-sized avatar

Andree Renneus trackd

View GitHub Profile
@trackd
trackd / linux_print_argv.c
Last active October 30, 2023 22:31 — forked from jborean93/linux_print_argv.c
Code that can be used to generate an executable that can print how it receives arguments
#include<stdio.h>
// gcc print_argv.c -o print_argv
int main(int argc, char *argv[])
{
int i;
for(i = 1;i < argc;i++)
{
printf("[%d] %s\n", i, argv[i]);
@trackd
trackd / Scan-LOLDrivers.ps1
Last active November 1, 2023 11:24 — forked from IISResetMe/Scan-LOLDrivers.ps1
minor refactor, outputs objects etc.
function Scan-LOLDrivers {
<#
.EXAMPLE
Scan-LOLDrivers -Path C:\Windows\System32\drivers
$Results = Scan-LOLDrivers -Path C:\Windows\inf
$Results | Select-Object *
$Results[0].all
$Results[0].all.KnownVulnerableSamples
.EXAMPLE
$iwantitall = 'C:\WINDOWS\inf',
@trackd
trackd / LOLDriverConfig.ps1
Created October 31, 2023 13:45 — forked from jsecurity101/LOLDriverConfig.ps1
PowerShell script that creates an audit or block Sysmon config based off of LOLDrivers
#Author: Jonathan Johnson (@jsecurity101)
function New-DriverConfig {
<#
.EXAMPLE
New-DriverConfig -Block
Creates driver block config in the current directory
.EXAMPLE
function ConvertTo-TableFormat {
<#
.SYNOPSIS
Rebuild an object based on the Format Data for the object.
.DESCRIPTION
Allows an object to be rebuilt based on the view data for the object. Uses Select-Object to create a new PSCustomObject.
#>
[CmdletBinding()]
param (
@trackd
trackd / Get-WTSSessionInfo.ps1
Last active March 26, 2024 11:50 — forked from jborean93/Get-WTSSessionInfo.ps1
Tries to replicate qwinsta but return structured objects
# Copyright: (c) 2022, Jordan Borean (@jborean93) <[email protected]>
# MIT License (see LICENSE or https://opensource.org/licenses/MIT)
Add-Type -TypeDefinition @'
using System;
using System.Runtime.InteropServices;
namespace Wtsapi32
{
public enum WtsConnectState
function Measure-ChildItem {
<#
.SYNOPSIS
Recursively measures the size of a directory.
.DESCRIPTION
Recursively measures the size of a directory.
Measure-ChildItem uses win32 functions, returning a minimal amount of information to gain speed. Once started, the operation cannot be interrupted by using Control and C. The more items present in a directory structure the longer this command will take.
This command supports paths longer than 260 characters.