Skip to content

Instantly share code, notes, and snippets.

View dtrizna's full-sized avatar

Dmitrijs Trizna dtrizna

View GitHub Profile
using System;
using System.Reflection;
using Microsoft.CSharp;
using System.Diagnostics;
using System.Runtime.InteropServices;
public class Program
{
public static void Main()
{
using System;
using System.Reflection;
using Microsoft.CSharp;
using System.Diagnostics;
using System.Collections.Generic;
using System.Runtime.InteropServices;
public class Program
{
static void Main(string[] args)
@dtrizna
dtrizna / kerberos_attacks_cheatsheet.md
Created September 4, 2019 06:52 — 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:

@dtrizna
dtrizna / showPid.cs
Last active January 22, 2021 13:52
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using System.Diagnostics;
namespace donutTestSimpleDotNetApp
@dtrizna
dtrizna / ms_xml_to_df.py
Last active September 23, 2022 21:24
Transform Microsoft XML into pandas DataFrame
import pandas as pd
import sys
from lxml import etree
def read_xml(FILENAME):
parser = etree.XMLParser(recover=True)
with open(FILENAME) as file:
data = file.readlines()
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import socket
import sys
listening_add = "192.168.56.1"
listening_port = 8888
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# bind socket obect to address and port and start to listen there
server.bind((listening_add, listening_port))
server.listen(5)
print("Listening on {}:{}".format(listening_add, listening_port))
from sklearn.preprocessing import LabelEncoder
from tensorflow.keras.preprocessing.sequence import pad_sequences
from datetime import datetime
import numpy as np
MAX_TIMESTEPS = 128
# number of features (except PID itself)
N = len(newdf.columns) - 1
def groupby_transform(dataframe, column):
from tensorflow import keras
METRICS = [
keras.metrics.TruePositives(name='tp'),
keras.metrics.FalsePositives(name='fp'),
keras.metrics.TrueNegatives(name='tn'),
keras.metrics.FalseNegatives(name='fn'),
# Precision: (TP) / (TP + FP)
# what proportion of predicted Positives is truly Positive
keras.metrics.Precision(name='precision'),
using System;
using System.Net;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.IO.Pipes;
using System.Reflection;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Runtime.InteropServices;