Skip to content

Instantly share code, notes, and snippets.

Rating System:

| 😡 - Awful | 😠 - Bad | 😐 - Fine | 😃 - Good | 😁 - Exceptional |

---------------------------------------------------------------------------------------------------------------

books listed in chronological order from last read to first read

  • 😃 - Surveillance Valley - Yasha Levine
  • 😃 - The Ransomware Hunting Team - Renee Dudley and Daniel Golden
  • 😠 - CRACK99 - David Locke Hall
  • 😃 - The Spy Who Couldn't Spell - Yudhijit Bhattacharjee
  • 😐 - The Fifth Domain - Richard A. Clarke, Robert K. Knake
  • 😁 - Fancy Bear Goes Phishing: The Dark History of the Information Age, in Five Extraordinary Hacks - Scott J. Shapiro
@tuantm8
tuantm8 / windows event logs cheat sheet
Created April 20, 2024 09:42 — forked from githubfoam/windows event logs cheat sheet
windows event logs cheat sheet
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# PS : ChatGPT makes mistakes, consider "trust but verify" principle
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#Events to Monitor
https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/plan/appendix-l--events-to-monitor
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#run
eventvwr.msc Event viewer
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Event Viewer(Local)-Windows Logs (shutdown / restart )
@tuantm8
tuantm8 / EventLogSearcher.cs
Created March 6, 2024 09:50 — forked from benpturner/EventLogSearcher.cs
Threaded EventLogSearcher for 4624 events
using System;
using System.Collections.Generic;
using System.Diagnostics.Eventing.Reader;
using System.Text.RegularExpressions;
using System.Threading;
namespace EventLogSearcher
{
class Program
{
@tuantm8
tuantm8 / rules-both.iptables
Created September 25, 2017 10:35 — forked from jirutka/rules-both.iptables
Basic iptables template for ordinary servers (both IPv4 and IPv6)
###############################################################################
# The MIT License
#
# Copyright 2012-2014 Jakub Jirutka <jakub@jirutka.cz>.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@tuantm8
tuantm8 / microsoftBookDownloader.py
Created September 20, 2017 16:25
Read comments below the first line for more details
#!/usr/bin/env python
# Author: Michael Devens
# Derek Ditch <github:@dcode>
# Github: https://github.com/co-devs
# Simple, poorly written script to download all of the files being shared
# by microsoft instead of downloading by hand. Downloads consecutively,
# will therefore take a while. Could be optimized, but meh.
# Also, download path is hardcoded. If you want to use it you will need
# to change the baseDir variable at a minimum
@tuantm8
tuantm8 / Security Onion installation
Created August 9, 2017 10:08 — forked from cleesmith/Security Onion installation
Security Onion installation in a virtualbox
Security Onion
Aug 2014:
... my purpose for installing this was to:
- learn more about security stuff
- steal the packet captures (pcap) provided so I can replay them using tcpreplay for snort testing,
as it's not so sexy to just test using ICMP ping data or local rules that match anything
see:
http://blog.securityonion.net/
@tuantm8
tuantm8 / ctci_ransom_note.py
Created June 13, 2017 07:55
Hackerrank Crack the coding interview Ransom note
def ransom_note(magazine, ransom):
if len(magazine) < len(ransom):
return False
dict_magazine = dict()
dict_ransom = dict()
for word in magazine:
if word not in dict_magazine:
dict_magazine[word] = 1
@tuantm8
tuantm8 / coin_change.py
Created May 6, 2017 23:54
Coin Change Problem hackerrank
def getWays(n, c):
# Complete this function
m = len(c)
# table will contains "cache"
# table[i, j] ~ change number i by first j coins (coins array should be sorted firstly)
table = [ [0 for j in range(m)] for i in range(n + 1) ]
for i in range(n+1):
for j in range(m):
if i == 0:
@tuantm8
tuantm8 / gist:547d6fb87eca894a0c6be4c35c33fc57
Last active April 4, 2017 17:24
References for interview
https://news.ycombinator.com/item?id=13823979
https://github.com/donnemartin/system-design-primer
https://github.com/donnemartin/interactive-coding-challenges
@tuantm8
tuantm8 / create_cron.sh
Last active March 30, 2017 02:57
Create crontab without duplicate (bash shell)
#!/bin/bash
#
#
#
function create_cron(){
new_entry="$1"
if ! crontab -l | fgrep -q "$new_entry"; then
TMP_CRON="/tmp/allcrons"
#write out current crontab