Skip to content

Instantly share code, notes, and snippets.

@nguyenl95
nguyenl95 / configure.sh
Created August 16, 2019 05:24
config elasticsearch
#!/usr/bin/env bash
# Production settings for Elasticsearch in Ubuntu 16.04
set -eux
CURRENT_USER=$(whoami)
CURRENT_DIR=$(dirname $0)
cd ${CURRENT_DIR}
# use x.sh <share-name> <mounted-folder>
sudo vmhgfs-fuse .host:/${1} ${2} -o allow_other -o uid=1000
<Sysmon schemaversion="4.1">
<!-- Capture all hashes -->
<HashAlgorithms>*</HashAlgorithms>
<EventFiltering>
<!-- Event ID 1 == Process Creation. Log all newly created processes except -->
<ProcessCreate onmatch="exclude">
<Image condition="contains">splunk</Image>
<Image condition="contains">btool.exe</Image>
<Image condition="contains">SnareCore</Image>
<Image condition="contains">nxlog</Image>
@nguyenl95
nguyenl95 / base64-to-hex.py
Created November 13, 2019 11:10 — forked from kkirsche/base64-to-hex.py
Decode base64 and convert to hex format, like shellcode
#!/usr/bin/env python
from base64 import b64decode
from urllib import unquote
base64_strs = ['xU5LNJhXeo9B6o4Ri%2FxFHodARXWqgtNufNrYzqG05nGOLNboDgJtkw%3D%3D',
'%2BjAd73J7RAZgLxAUkIG5l0cMPLQEBAtZRMP3WdXr1%2BMYdrg2cZKaow%3D%3D']
for bstr in base64_strs:
unquoted_bstr = unquote(bstr)
## uploaded by @JohnLaTwC
https://www.virustotal.com/en/file/0c30d700b131246e302ff3da1c4180d21f4650db072e287d1b9d477fe88d312f/analysis/
https://docs.microsoft.com/en-us/windows/desktop/api/wininet/nf-wininet-internetconnecta
void InternetConnectA(
HINTERNET hInternet,
LPCSTR lpszServerName,
INTERNET_PORT nServerPort,
LPCSTR lpszUserName,
LPCSTR lpszPassword,
DWORD dwService,
@nguyenl95
nguyenl95 / ida_memdump.py
Created January 2, 2020 05:22 — forked from herrcore/ida_memdump.py
Dump a blob of memory into a file - IDA Pro script
import idautils
import idaapi
def memdump(ea, size, file):
data = idc.GetManyBytes(ea, size)
with open(file, "wb") as fp:
fp.write(data)
print "Memdump Success!"
@nguyenl95
nguyenl95 / ida_memdump.py
Created January 2, 2020 05:22 — forked from herrcore/ida_memdump.py
Dump a blob of memory into a file - IDA Pro script
import idautils
import idaapi
def memdump(ea, size, file):
data = idc.GetManyBytes(ea, size)
with open(file, "wb") as fp:
fp.write(data)
print "Memdump Success!"
@nguyenl95
nguyenl95 / powershell-non-domain-remoting.md
Created January 7, 2020 16:58 — forked from cmcginty/powershell-non-domain-remoting.md
Windows Powershell Remoting into Non-Domain Joined System

Powershell Remoting to a Non-Domain Host

  1. From an admin shell, enable PS remoting on the machine you wish to access:
New-ItemProperty -Name LocalAccountTokenFilterPolicy `
  -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System `
  -PropertyType DWord -Value 1

Enable-PsRemoting -Force
Get-ChildItem -Path c:\ -Recurse | Sort-Object Length -Descending | Select-Object length,name,directory -First 100 | Format-Table -AutoSize
@nguyenl95
nguyenl95 / install-vmware-tools
Created July 9, 2023 15:29 — forked from trietptm/install-vmware-tools
Patch for install-vmware-tools REMnux script to use shared folders
The file install-vmware-tools is from REMnux v6 scripts: https://launchpad.net/~remnux/+archive/ubuntu/stable/+files/remnux-scripts_0.1.50.tar.gz
install-vmware-tools_TrietPTM is my patch for the "install-vmware-tools" script that’s present on REMnux v6 to fix a compatibility issue between VMware Tools and the Linux kernel included in Ubuntu, which prevents shared folders from working.
Other Ways You Can Help With REMnux: https://zeltser.com/remnux-v6-release-for-malware-analysis/