Skip to content

Instantly share code, notes, and snippets.

@aguytech
aguytech / mongodb--syntax.md
Last active July 20, 2022 20:21
[mongodb] #db #tips

client

list users

mongo
	use admin
	db.getUsers()
	exit
@aguytech
aguytech / tsurugi-conf.sh
Last active June 21, 2022 22:24
[tsurugi] modifications tsurugi vm #forensic #disk #memory #network
#!/bin/bash
#### system
sudo swapoff -av
sudo sh -c 'echo vm.swappiness=5 > /etc/sysctl.d/99-swappiness.conf'
#### volatility
# https://github.com/volatilityfoundation/volatility/wiki/Installation
@aguytech
aguytech / xxd-install.sh
Last active June 14, 2022 09:51
[xxd] help for xxd #bash #help #malware #forensic
#!/bin/bash
sudo apt install bsdmainutils
@aguytech
aguytech / doc.md
Last active August 28, 2022 03:55
[bash-completion] personal bash completions #bash #bashroot #tips

https://opensource.com/article/18/3/creating-bash-completion-script

COMPREPLY

an array variable used to store the completions. The completion mechanism uses this variable to display its contents as completions

COMPREPLY=( $(compgen -W "now tomorrow never" -- ${COMP_WORDS[COMP_CWORD]}) ) # propose given words at each let choose the first completion from given words and repeat it after (replace)
COMPREPLY=( $(compgen -W "now tomorrow never" "${COMP_WORDS[1]}") ) # let choose the first completion from given words and repeat it after (replace)
@aguytech
aguytech / forensic-disk-info.md
Last active June 18, 2022 22:37
[forensic-disk] forensic tips for disk analysis #bash #malware #forensic #tips #disk

file

file ${file} # show informations

fdisk

fdisk -x ${file} # show informations
@aguytech
aguytech / cmp-options.md
Last active June 14, 2022 10:06
[cmp] Compares binary files #bash #help #forensic #malware
-b, --print-bytes # print differing bytes
-i, --ignore-initial=SKIP # skip first SKIP bytes of both inputs
-i, --ignore-initial=SKIP1:SKIP2 # skip first SKIP1 bytes of FILE1 and first SKIP2 bytes of FILE2
-l, --verbose # output byte numbers and differing byte values
-n, --bytes=LIMIT # compare at most LIMIT bytes
-s, --quiet, --silent # suppress all normal output
@aguytech
aguytech / hive-disable-security-center.reg
Last active June 14, 2022 10:07
[hive] Windows hive analysis #bash #disk #forensic #help #hive #tips #windows
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SecurityHealthService]
"Start"=dword:00000004
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\wscsvc]
"Start"=dword:00000004
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender]
"DisableAntiSpyware"=dword:00000001
@aguytech
aguytech / reglookup-install.md
Last active June 14, 2022 10:08
[reglookup] Hive analysis #bash #help #forensic #disk #hive

ubuntu

sudo apt install reglookup
@aguytech
aguytech / regripper-install.md
Last active June 14, 2022 10:09
[regripper] Hive analysis #bash #help #forensic #disk #hive

See foralyse

@aguytech
aguytech / sqlite3-windows-notification.md
Last active June 14, 2022 10:05
[sqlite3] sqlite to analyse windows notification #bash #malware #forensic #tips

sqlitebrowser

file=/vol6/Users/Angela/AppData/Local/Microsoft/Windows/Notifications/wpndatabase.db
sqlitebrowser ${file}

query

SELECT datetime((ArrivalTime/10000000)-11644473600, 'unixepoch') AS ArrivalTime,