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

Tuesday, January 25, 2011

In-line Image Go Away.

I really hate the way mac os x mail does inline attachments.
Why can they just leave the attachments alone....

after googling i found a way to make this go away and behave like any good old attachment.

To Disable In-line attachments on Mail.app [AppleKey + Shift + U --> select Terminal.app] with this command:

defaults write com.apple.mail DisableInlineAttachmentViewing -bool yes

If you want to make your email look default butt ugly you can restore it on Mail.app [AppleKey + Shift + U --> select Terminal.app] with this command:

defaults write com.apple.mail DisableInlineAttachmentViewing -bool false


whew! :) Better!

Saturday, September 18, 2010

Hitchhiker's Guide to Hiding on the Internet for MacFolks

Recently updated my Vidalia App and I got in to some issues with polipo. I redo the entire installation and proceed as follows:


Vidalia 0.2.10
Tor 0.2.1.25

Download Vidalia directly from the website: http://www.torproject.org/vidalia/

Install MacPorts
sudo port install tor
sudo port install polipo
sudo port load polipo


Polipo Configuration Guide:

polipo does not come with a working config you have to make your own or just copy and customize the sample configs found on /opt/local/etc/polipo/ here's how i did mine.

sudo touch /opt/local/etc/polipo/config

Open an editor program (vi/etc) and put the following config

socksParentProxy = "localhost:9050"
socksProxyType = socks5

Port 9050 is the tor deamon.

to verify your polipo config

http://localhost:8123

Vidalia Settings

Stop Start the Vidalia Daemon (Gui)

and point your proxy to

IP: localhost
Port: 8123

enjoy secure surfing via tor.

to check your tor presence go to the following link.

https://check.torproject.org

Wednesday, July 21, 2010

DVD on Mac OS X stopped working

Mac OS X weird Logs:

7/21/10 8:27:37 PM kernel SCSITaskUserClient - Invalid arguments: scatterGatherEntries = 1, requestedTransferCount = 0, transfer direction is 0
7/21/10 8:27:38 PM kernel SCSITaskUserClient - Invalid arguments: scatterGatherEntries = 1, requestedTransferCount = 0, transfer direction is 0
7/21/10 8:27:39 PM kernel SCSITaskUserClient - Invalid arguments: scatterGatherEntries = 1, requestedTransferCount = 0, transfer direction is 0
7/21/10 8:27:40 PM kernel SCSITaskUserClient - Invalid arguments: scatterGatherEntries = 1, requestedTransferCount = 0, transfer direction is 0
7/21/10 8:27:41 PM kernel SCSITaskUserClient - Invalid arguments: scatterGatherEntries = 1, requestedTransferCount = 0, transfer direction is 0

I tried to burn with toaster but no dice. I'm uninstalling the toaster and re-trying it.

**UPDATE**

After uninstalling Toaster 10 on my Mac. My CDROM work flawlessly. it seems that this issue started after I applied a patch on my Mac. considering the weight of burning using toaster and having bugs fixed on Mac OS X, I would choose an OS patch than a 3rd party burner. I can always burn through (AppleKey + Shift + U) Disk Utilities.

Wednesday, March 17, 2010

Finding out information on a ton of IP's

I made the following script to make life simple.. (atleast for me)

#!/usr/bin/perl
open (ipfile, 'ip.csv');
while () {
chomp;
$nrange = '| /usr/bin/egrep -i "NetRange|Country|OrgName|NET"';
print "$_\n";
my $ips = "$_";
my $output = qx/whois $ips $nrange/;
print $output;

sample: ip.csv
192.168.1.0

:) yey no more manual whois crap.

Saturday, February 27, 2010

Attack_Simulation_and_Threat_Modeling

Attack Simulation and Threat Modeling.

I got this off google's html cache. since the main site is bogged down.(too many users downloading this doc) It's a pretty good read.

enjoy.

RapidShare Link:

http://rapidshare.com/files/370085717/Attack_Simulation_and_Threat_Modeling.zip.html
MD5: C1A1E731E1FBF67516D20242355D0218

Friday, February 26, 2010

Proxychains 3.1 on OpenBSD 4.6

Proxychains - Great tool for tor'ing.

Patch introduced on the misc-openbsd instructed me on getting the freebsd version of the patch.

FreeBSD patch Link:
http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/ports/net/proxychains/files/patch-proxychains-libproxychains.c?rev=1.1;content-type=text%2Fplain

I tried to build it but no dice. After messing around with it. I got a working patch: please see below.

--- proxychains/libproxychains.c.orig Wed Mar 15 18:16:59 2006
+++ proxychains/libproxychains.c Sun Dec 10 01:16:37 2006
@@ -160,7 +160,7 @@

if(!(file=fopen("./proxychains.conf","r")))
if(!(file=fopen(buff,"r")))
- if(!(file=fopen("/etc/proxychains.conf","r")))
+ if(!(file=fopen("/etc/proxychains.conf","r")))
{
perror("Can't locate proxychains.conf");
exit(1);
@@ -290,8 +290,8 @@

int getnameinfo (const struct sockaddr * sa,
socklen_t salen, char * host,
- socklen_t hostlen, char * serv,
- socklen_t servlen, unsigned int flags)
+ size_t hostlen, char * serv,
+ size_t servlen, int flags)
{
int ret = 0;
if(!init_l)


Apply patch and build it.

./configure --prefix=/usr/local <-- prefix location needs to be specified.
gmake
sudo gmake install

patch is tested on openbsd 4.6(stable) and proxychains 3.1