Script to Backup Alienvault OSSIM Master Server

Script to backup AlienVault OSSIM master server . . . → Read More: Script to Backup Alienvault OSSIM Master Server

Return AlienVault OSSIM Current Version from Command Line

If you want to return the current AlienVault OSSIM version you are running from a command line try this:

version=$(dpkg -l | grep ossim-cd-tools | awk ‘{print $3}’ | awk -F’-‘ ‘{ print $1 }’) echo $version

tmux horizontal window splitting

To split terminal in to four horizontal tmux windows you can run the following code:

#!/bin/bash tmux new-window -a -n WinSplit tmux new-session -d -s WinSplit tmux selectp -t WinSplit tmux split-window -v tmux set-window-option -g window-status-current-bg blue tmux split-window -v tmux split-window -v tmux select-layout even-vertical tmux attach -t WinSplit

The result is something . . . → Read More: tmux horizontal window splitting

Compare two Files and Print Lines that Match

The proper way to compare two files and print lines that match:

awk ‘NR==FNR{arr[$0];next} $0 in arr’ file1.txt file2.txt

Here is a shell script you can run:

#!/bin/bash # Filename: showdupes.sh # source: http://brakertech.com/compare-two-files-and-print-lines-that-match/ # this file takes two text files as input # sorts them and outputs lines from # file 2 that match . . . → Read More: Compare two Files and Print Lines that Match

Manually Install Kali Linux 2018.4 x64 with VM Fusion 10

Problem

Kali Linux 2018.4 x64 fails to install manually when using VM Fusion 10.1.5 (hangs during “copying data to disk” portion of the install).

Solution Create a new Custom VM Select the iso you downloaded When prompted for the OS of ISO select “Debian 8.x 64 bit” Name the VM ‘kali-linux-2018.4-vm-amd64’ (not required) Set the . . . → Read More: Manually Install Kali Linux 2018.4 x64 with VM Fusion 10

Extracting Password Hashes from Active Directory

Extracting hashes from Active Directory

To extract hashes from Active Directory you must first obtain a copy of the underlying Active Directory database; ntds.dit

For more information on the Data Store Architecture please refer to this Microsoft Technet article

Prerequisites

You must be logged on to a domain controller.

Extracting the Database

To extract . . . → Read More: Extracting Password Hashes from Active Directory

Use ngrep to capture syslog traffic

Instead of using wireshark on Linux to capture traffic try ngrep

# sudo ngrep -d <interface> ‘<search string>’ ‘port 514’

source: http://ngrep.sourceforge.net/usage.html

How to Install nginx and PHP on CentOS7

Install nginx and PHP on CentOS7

These are some notes from installing nginx on CentOS7

Install some prerequisites sudo yum -y groupinstall “Development tools” sudo yum -y install mlocate sudo yum -y install iptables-services sudo yum -y install php-mysql php-dom sudo yum -y install wget sudo service php-fpm restart Install GeoIP cd /tmp wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz . . . → Read More: How to Install nginx and PHP on CentOS7

iis disable debug

In IIS to disable debug do the following.

Modify the Web.config File Open the Web.config file in a text editor such as Notepad.exe. Web.config file is typically located in the application directory.

Modify the compilation element and set debug=”false”

<compilation debug=”false” />

Save the Web.config file. The ASP.NET application automatically restarts.

Modify the Machine.config file . . . → Read More: iis disable debug

diff two files and output lines not seen in file 2

Problem

You need two diff two files and only output what is unique to file one.

text file 1 contains:

1 2 3 4 5

text file 2 contains:

6 7 1 2 3 4 Solution $ awk ‘FNR==NR{a[$0]++;next}!a[$0]’ file1 file2 6 7

Explanation of how the code works:

If we’re working on file1, track . . . → Read More: diff two files and output lines not seen in file 2