Thursday, July 28, 2022

Mikrotik Packet Capture Streaming Setup with Wireshark

To get this setup to work you need to setup mikrotik's streaming sniffer service:

1.) CLI

/tool sniffer set streaming-enabled=yes streaming-server=<wireshark-host-ip>

/tool sniffer start

Wireshark --> Capture --> Capture Filters


Filter Name: Microtik Packet Capture
Filter Express: udp port 37008


and its ready!




Sunday, March 6, 2022

Mojave OSX

Want to make a mojave USB installer. 

Download Mojave Installer

https://apps.apple.com/us/app/macos-mojave/id1398502828?mt=12

Format USB drive with atleast 16GB of storage space) 

sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/<volumename>

Sunday, April 14, 2019

No you will not get a sample of my stuff.

Look...W10 you will not get a sample of my stuff tyvm. 













If I want nefarious code to get blocked, I'll block it myself tyvm. The reg change will stop w10 from messing with your stuff, it stops the code grabbing too. pffttt

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender]
"DisableAntiSpyware"=dword:00000001
"DisableBehaviorMonitoring"=dword:00000001
"DisableOnAccessProtection"=dword:00000001
"DisableScanOnRealtimeEnable"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Policy Manager]

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System]
"EnableSmartScreen"=dword:00000000


Wednesday, January 23, 2019

Node JS Update OSX

node update

sudo npm cache clean -f (force switch will delete all your npm stuff)
sudo npm install -g n
sudo n stable

Wednesday, January 9, 2019

Building OSX Images for fun and profit

I'm compiling all the build instruction into one repository. It's a bitch to go look for all this on the internets, so I'm just dropping it here for my own convenience.

Mojave OSX 

hdiutil create -o mojave.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach mojave.cdr.dmg -noverify -mountpoint /Volumes/install_build
sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build
mv mojave.cdr.dmg InstallSystem.dmg
hdiutil detach /Volumes/Install\ macOS\ Mojave/
hdiutil convert InstallSystem.dmg -format UDTO -o Mojave.iso 

High Sierra OSX 

hdiutil create -o highsierra.cdr - size 7316m -layout SPUD -fs HFS+J
hdiutil attach highsierra.cdr.dmg -noverify -mountpoint /Volumes/install_build
sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia —volume /Volumes/install_build --nointeraction
mv highsierra.cdr.dmg highsierra.dmg
hdiutil detach /Volumes/Install\ macOS\ High\ Sierra/
hdiutil convert highsierra.dmg -format UDTO -o highsierra.iso 

Sierra OSX 

hdiutil attach /Applications/Install\ macOS\ Sierra.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app
hdiutil create -o /tmp/Sierra.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach sierra.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build
asr restore -source /Volumes/install_app/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
rm /Volumes/OS\ X\ Base\ System/System/Installation/Packages
cp -rp /Volumes/install_app/Packages /Volumes/OS\ X\ Base\ System/System/Installation/
cp -rp /Volumes/install_app/BaseSystem.chunklist /Volumes/OS\ X\ Base\ System/BaseSystem.chunklist
cp -rp /Volumes/install_app/BaseSystem.dmg /Volumes/OS\ X\ Base\ System/BaseSystem.dmg
hdiutil detach /Volumes/install_app
hdiutil detach /Volumes/OS\ X\ Base\ System/
hdiutil convert sierra.cdr.dmg -format UDTO -o sierra.iso
mv sierra.iso.cdr sierra.iso

El Capitan OSX 

hdiutil attach "/Applications/Install OS X El Capitan.app/Contents/SharedSupport/InstallESD.dmg" -noverify -nobrowse -mountpoint /Volumes/esd
hdiutil create -o elcapitan.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach elcapitan.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/iso
asr restore -source /Volumes/esd/BaseSystem.dmg -target /Volumes/iso -noprompt -noverify -erase
rm /Volumes/OS\ X\ Base\ System/System/Installation/Packages
cp -rp /Volumes/esd/Packages /Volumes/OS\ X\ Base\ System/System/Installation
cp -rp /Volumes/esd/BaseSystem.chunklist /Volumes/OS\ X\ Base\ System/
cp -rp /Volumes/esd/BaseSystem.dmg /Volumes/OS\ X\ Base\ System/
hdiutil detach /Volumes/esd
hdiutil detach /Volumes/OS\ X\ Base\ System
hdiutil convert elcapitan.cdr.dmg -format UDTO -o elcapitan.iso
mv elcapitan.iso.cdr elcapitan.iso

Yosemite OSX 
TBC

Mavericks OSX  

TBC

Monday, January 7, 2019

Make your VM behave like bare metal on VMWare

DEP or MDM software requires some additional hardware config on VMWare. Below are the additional params needed to make a working OSX VM on VMWare Fusion. 

Save this to your .vmx file 

hw.model = "MacBookPro11,2" 
serialNumber = ""
uuid.bios = ""
uuid.location = "same as uuid.bios" 

helpful links: 

hw.model = " "  
https://everymac.com/systems/by_shipping/index-currently-shipping-macs.html

serialNumber = " "
https://giuliomac.wordpress.com/2014/03/01/5-real-mac-serial-numbers-for-your-hackintosh/

uuid.bios = " " 
https://www.uuidgenerator.net/


Thursday, January 3, 2019

high-sierra installer

sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/peste/ --applicationpath /Applications/Install\ macOS\ High\ Sierra.app/

Wednesday, October 24, 2018

Build and Run hashcat with OpenCL (unoptimized kernel)

This builds working hashcat + OpenCL that uses Intel HD Graphics / AMD Radeon GPU's on OSX. 

Step #1) git clone https://github.com/hashcat/hashcat.git

Step #2) git clone https://github.con/KhronosGroup/OpenCL-Headers.git hashcat/deps/OpenCL 
NOTE: deps folder appears to be existing on official hashcat pull as of 10/24/2018. 

Step #3) cd hashcat && make

Step #4) to test run ./example0.sh 



Saturday, April 14, 2018

wasming around; making your browser run low-level code

Building emscripten is done by: 

https://kripken.github.io/emscripten-site/docs/getting_started/Tutorial.html

git clone https://github.com/juj/emsdk.git
cd emsdk
./emsdk update 
./emsdk install latest
./emsdk activate latest 
echo "source ./emsdk_env.sh" >> ~/.bash_profile

building hello.wasm (666 bytes). pretty cool asm code run by your browser :) weeee... this is fun and useful for more nefarious things.








hex dump





Wednesday, January 24, 2018

When you have DOAS but still miss SUDO and then it snoballed from there. LOL

OpenBSD's doas (dedicated openbsd application subexecutioner) is a neat tool don't get me wrong and the config syntax is simple. But sometimes... you just miss sudo. 😢


Then you started googling and someone came up with a better name for doas... *bites lower lip while typing this* LMAO




Tuesday, January 9, 2018

Building Flashrom for Buspirate

Tested on ubuntu mate

Pull flashrom's SVN:

svn co https://code.coreboot.org/svn/flashrom/trunk

Install dependencies:

sudo apt-get install libpci-dev libpci3 libusb-dev

Build Flashrom:

make
make install

flashrom

Friday, November 24, 2017

Nuking OSX's Logical Volume Group (LVG)

Nuking OSX's Logical Volume Group (LVG). Just because, i don't like your stinking control software. 

Command+R
Open Terminal
(make sure you are root #) 

#diskutil cs list
#diskutil cs delete

UUID of Logical Volume Group


Monday, November 6, 2017

I'm lazy but i want a new version of nmap running on OpenBSD 5.9. But sadly lazy build (./configure && gmake && gmake install) just won't cut it. I'm not lazy to figure out why it doesn't. so finally got it working  


# uname -psvr 

OpenBSD 5.9 GENERIC#1761 amd64
# pwd 
/root/nmap-7.60
# ./configure --without-zenmap --with-libpcap=included
# gmake && gmake install
# nmap -V
Nmap version 7.60 ( https://nmap.org )
Platform: x86_64-unknown-openbsd5.9
Compiled with: nmap-liblua-5.3.3 openssl-2.3.2 nmap-libssh2-1.8.0 libz-1.2.8 nmap-libpcre-7.6 nmap-libpcap-1.7.3 nmap-libdnet-1.12 ipv6
Compiled without:
Available nsock engines: kqueue poll select


OK back to being lazy again :) 

Thursday, August 17, 2017

OpenBSD and Tor

Building tor from source tree.

export PKG_PATH="ftp://ftp.hostserver.de/pub/OpenBSD/5.9/packages/amd64/"
pkg_add -iv libevent
wget https://www.torproject.org/dist/tor-0.3.0.10.tar.gz
tar zxvf tor-0.3.0.10.tar.gz
cd tor-0.3.0.10
./configure --prefix=/usr/local
gmake
gmake install

I'll post how i configure shit when, I have time.


Wednesday, February 8, 2017

Override OpenJDK with Oracle's JDK8



I'm so lazy so here it is plain and simple. works on Ubuntu'ish Linux

cat > /etc/apt/sources.list.d/webupd8team-java.list<< EOF
deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
EOF
Added keys to the repo
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
Update Packages
apt-get update
apt-get install oracle-java8-installer
Done!

Thursday, December 22, 2016

Nethunter Update/Upgrade Shenanigans

Scouring for answers on the forums takes a while to get the real answer. My intention is to put the basics here of how I fixed it. 

Issue #1 - Nethunter failed Repo:





Solution: Add Kali-Rolling's Repo on /etc/apt/sources.list




Issue #2 Upgrading Nethunter 

Solution: Uninstall Nethunter App (like you do with regular Android Apps) and Install lastest.apk 

 

Friday, January 16, 2015

Building ruby-oci8 using Oracle 12.1.0.2.0 instaclient

from Kali a quick and dirty build for ruby-oci8 for Oracle testing. this is using the latest instaclient .zips from Oracle. 

Step 1: Download Oracle 

http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html

Step 2: 

mkdir /opt/oracle
cd /opt/oracle
git clone https://github.com/kubo/ruby-oci8 ruby-oci8
unzip instantclient-basic-linux.x64-12.1.0.2.0.zip
unzip instantclient-sdk-linux.x64-12.1.0.2.0.zip
unzip instantclient-sqlplus-linux.x64-12.1.0.2.0.zip
ln -s libclntsh.so.12.1 libclntsh.so

#!/bin/bash
echo "export PATH=$PATH:/opt/oracle/instantclient_12_1" >> /root/.bashrc
echo "export SQLPATH=/opt/oracle/instantclient_12_1" >> /root/.bashrc
echo "export TNS_ADMIN=/opt/oracle/instantclient_12_1" >> /root/.bashrc
echo "export LD_LIBRARY_PATH=/opt/oracle/instantclient_12_1" >> /root/.bashrc
echo "export ORACLE_HOME=/opt/oracle/instantclient_12_1" >> /root/.bashrc

export LD_LIBRARY_PATH=/opt/oracle/instantclient_12_1
cd ruby-oci8
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install 

Tuesday, March 20, 2012

Riorey

I've used them for a couple of years cool hardware they got performance wise it really does what it's supposed to do. I recommend it for people that wanted a more automated approach to DDoS Mitigation.

http://www.riorey.com/company-difference.html


It's quite kind for riorey to publish their Taxonomy of DDoS Attacks. pretty nice read.
http://www.riorey.com/x-resources/2011/RioRey_Taxonomy_DDoS_Attacks_2.2_2011.pdf

Monday, March 19, 2012

VirtualBox 4.1.10 on Solaris 10 Update 10

I've been building a cool lab using Virtualbox 4.1.10 and run it under a headless setup on Solaris 10 Update 10. I've been hitting a wall with a silly error

Installing Python bindings...
Traceback (most recent call last):
File "./vboxapisetup.py", line 14, in ?
from distutils.core import setup
ImportError: No module named distutils.core
- Installed: Bindings for Python 2.6
Updating the boot archive...

Installation of was successful.

VirtualBox installs fine but I want to find out why is that error creeping out whereas it should be just a smooth install. I hopped into the forums and found that it's an old error and was fixed by installing SUNWPython-devel.. but no dice I have the file installed but my issue still continues..

$ pkginfo | grep Python
GNOME2 SUNWPython The Python interpreter, libraries and utilities
GNOME2 SUNWPython-devel The Python interpreter, libraries and utilities - development files
GNOME2 SUNWPython-share The Python interperer, libraries and utilities - platform independent files, /usr/sfw/share
system SUNWlxml-python The XML library - Python bindings
system SUNWlxsl-python The XSLT library - Python bindings

I found the file that is breaking it's python hopping which is the reason why it breaks.

# ./pkginstall.sh
Checking for older & partially installed bits...
- Unloaded: Web service
- Unloaded: Balloon control service
- Unloaded: Zone access service
- Unloaded: NetFilter (STREAMS) module
- Removed: NetFilter (STREAMS) module
- Unloaded: NetAdapter module
- Removed: NetAdapter module
- Unloaded: Host module
- Removed: Host module
Updating the boot archive...
Installing new ones...
Detected Solaris 5.10 Version Generic_147441-01
Loading VirtualBox kernel modules...
- Loaded: Host module
- Loaded: NetAdapter module
- Loaded: NetFilter (STREAMS) module
Configuring services...
- Loaded: Zone access service
Installing MIME types and icons...
Installing Python bindings...
/usr/bin/python2.4 <-- here's where the python hopping begins.
Traceback (most recent call last):
File "vboxapisetup.py", line 14, in ?
from distutils.core import setup
ImportError: No module named distutils.core
/usr/bin/python2.6 <-- this is the python version i want
- Installed: Bindings for Python 2.6
Updating the boot archive...
Post installation completed successfully!

I checked the script and it's pointing to another script named vboxconfig.sh, Since it shows that it won't stay put on just one version of python I decided to just cut the code where it does auto-detection (more like auto-defect than detect here)

PYTHONBIN=`which python 2> /dev/null`
if test -f "$PYTHONBIN" || test -h "$PYTHONBIN"; then
infoprint "Installing Python bindings..."

INSTALLEDIT=1
# PYTHONBIN=`which python2.4 2>/dev/null`
# install_python_bindings "$PYTHONBIN" "Python 2.4"
# if test "$?" -eq 0; then
# INSTALLEDIT=0
# fi
# PYTHONBIN=`which python2.5 2>/dev/null`
# install_python_bindings "$PYTHONBIN" "Python 2.5"
# if test "$?" -eq 0; then
# INSTALLEDIT=0
# fi
PYTHONBIN=`which python2.6 2>/dev/null`
install_python_bindings "$PYTHONBIN" "Python 2.6"
if test "$?" -eq 0; then
INSTALLEDIT=0
fi

Final test and...

# ./pkginstall.sh
Checking for older & partially installed bits...
- Unloaded: Web service
- Unloaded: Balloon control service
- Unloaded: Zone access service
- Unloaded: NetFilter (STREAMS) module
- Removed: NetFilter (STREAMS) module
- Unloaded: NetAdapter module
- Removed: NetAdapter module
- Unloaded: Host module
- Removed: Host module
Updating the boot archive...
Installing new ones...
Detected Solaris 5.10 Version Generic_147441-01
Loading VirtualBox kernel modules...
- Loaded: Host module
- Loaded: NetAdapter module
- Loaded: NetFilter (STREAMS) module
Configuring services...
- Loaded: Zone access service
Installing MIME types and icons...
Installing Python bindings...
- Installed: Bindings for Python 2.6
Updating the boot archive...
Post installation completed successfully!


it worked! good times. I'm running the following version just so people can see.

Solaris 10 Update 10
VirtualBox 4.1.10 (VirtualBox-4.1.10-SunOS-r76795.pkg)
Python2.6.4


Saturday, February 5, 2011

GPG for your Mac

Talking to peers over email is a unsecure (for the paranoid in me). It's nice to try something that can make the badguys work a bit harder. Enter... GPG!

GPG (Gnu PGP) is a good way of encrypting and verifying that the data really belongs to the said person, and here's how i did it on my mac.

Install GPG

http://www.gpgtools.org/installer.html

From the shell[Terminal]. ($)

Tip 1.) To Generate your own GPG Key (Follow the instructions after running the command below. Keep the Default DSA Elgamal Encryption) and viola! you have your own gpg key.

$gpg --gen-key

Tip 2.) To Verify your key

$gpg --list-secret-keys

Tip 3.) Exporting your GPG Key (good for Emails)

$gpg --output MyGPGKey.pgp --export john@doe.email

Tip 4.) Exporting your GPG Key (for Public Display website, etc.)

$gpg --output MyGPGKey.pgp --export john@doe.email --armor

Tip 5.) Importing someone else's GPG Key (Extensions sometimes come as .asc or .gpg)

$gpg --import foobar.asc

Tip 6.) To Validate GPG Keys from others

$gpg --edit-key john@doe.email

Tip 7.) To send your key to a public GPG Server (GPG ID is found on the sec portion of the output for Tip #2)

$gpg --send-keys GPG ID


Keep safe on the Internet