You are currently browsing the System Administration category
Displaying 1 - 10 of 21 entries.

MacOs: ISO to USB-Stick Perl script

  • Posted on November 3, 2019 at 17:18

Making bootable USB sticks was always easy with MacOs and Balena Etcher. But for some reason this stopped working (for me) with Catalina.

But not to worry! It can now be done with this Perl script I wrote today:
Usage is simple. Help message says it all.
And here with syntax highlighting. Just because we can.

$ ./
You have to be root!
Usage. : # ./ isofile device
Example: # ./ /Users/krusjme/Downloads/kubuntu19.iso /dev/disk2

The script takes care of basically al the hassle that you may run into doing all the command line stuff yourself. It unmounts all possibly mounted volumes on the destination device and it doesn’t nag about existing files. It just overwrites them. On top of that it shows a performance indicator thanks to gdd instead of good old dd.

Here, something like a ‘screen shot’! 🙂

$ sudo ./ CentOS-7-x86_64-NetInstall-1908.iso disk2
Destination disk is given without /dev. Adding it now
Full destination path is: /dev/disk2
Inventorizing possible mounts on destination disk
Unmounting volumes on destination disk
Umounting volume: /dev/disk2s1
Volume TESTVOLUME on disk2s1 unmounted
Making up HDIUtil-command
Converting iso to raw image
Reading Master Boot Record (MBR : 0)…
Reading CentOS 7 x86_64                  (Apple_ISO : 1)…
Reading  (Type EF : 2)…
Reading CentOS 7 x86_64                  (Apple_ISO : 3)…
Elapsed Time:  1.024s
Speed: 539.0Mbytes/sec
Savings: 0.0%
created: /Users/KrusjMe/Desktop/iso2usbstick/CentOS-7-x86_64-NetInstall-1908.dmg
Making up DD-command
DD-command: /opt/local/bin/gdd bs=1M status=progress if=CentOS-7-x86_64-NetInstall-1908.dmg of=/dev/disk2
578551808 bytes (579 MB, 552 MiB) copied, 158 s, 3.7 MB/s
551+1 records in
551+1 records out
578551808 bytes (579 MB, 552 MiB) copied, 158.053 s, 3.7 MB/s 

With thanks to for the command line instructions

Fully Ready Ubuntu Machine

  • Posted on June 24, 2019 at 00:11
apt update && apt upgrade && apt install \
 autoconf \
 bat \
 bless \
 bmon \
 boxes \
 build-essential \
 busybox-static \
 cifs-utils \
 cmake \
 curl \
 dcfldd \
 default-jdk \
 dictionaries-common \
 dialog \
 disktype \
 dmg2img \
 dmidecode \
 dnsutils \
 ewf-tools \
 exfat-utils \
 exiftool \
 flex \
 foremost \
 forensics-all \
 forensics-extra \
 gpart \
 git \
 guymager \
 gnome-tweak-tool \
 gnome-shell-extension-dash-to-panel \
 hexedit \
 htop \
 kpartx \
 libcompress-raw-lzma-perl \
 libio-compress-lzma-perl \
 libdbd-pg-perl \
 libdbd-mysql-perl \
 libhyperscan5 \
 liblzma-dev \
 libssl-dev \
 locate \
 lsscsi \
 maven \
 net-tools \
 mc \
 nfs-common \
 nfs-kernel-server \
 nmap \
 ntfs-3g \
 okteta \
 p7zip \
 par2 \
 perl \
 postgresql \
 postgresql-plperl \
 pv \
 pinta \
 python3-cairo-dev \
 python3-pip \
 python3-pkgconfig \
 resolvconf \
 qemu-utils \
 samba \
 shotwell \
 scalpel \
 screen \
 sleuthkit \
 ssh \
 sshfs \
 sysvbanner \
 testdisk \
 traceroute \
 tree \
 unrar \
 vim \
 wireshark \
 xfsprogs \

For CPAN modules check this post!

Sublime Text 2 on macOS: Package Control: Error: InvalidCertificateException

  • Posted on March 31, 2019 at 23:19


The complete console error messsage is something like this:
Package Control: Error downloading package. HTTP exception InvalidCertificateException (Host returned an invalid certificate ([SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:548)))wnloading package. Htto exception InvalidCertificateExceptio


In Sublime Text 2, go to: Preferences->Package Settings->Package Control->Settings-Default,

Here, change:

“downloader_precedence”: {
“windows”: [“wininet”],
“osx”: [“urllib”],
“linux”: [“urllib”, “curl”, “wget”]


“downloader_precedence”: {
“windows”: [“wininet”],
“osx”: [“curl”, “urllib”],
“linux”: [“urllib”, “curl”, “wget”]

Installing the Python urllib will probably also solve the problem, but it might brings up new questions like: Which Python version? Is urllib in the Sublime Text search path…
Then changing the preferred downloader to curl is easier.

Credits go to LandisTwo

Inetutils: ftpd with extensive logging

  • Posted on December 2, 2018 at 13:58

By default this ftp-server does not log a lot by default.

To enable extensive logging to the default logger use the –debug option

Example systemd-script

Description=FTPD Daemon

ExecStart=/usr/bin/ftpd --daemon --debug
ExecStopPost=/usr/bin/rm -f /run/




Perl and macOS Mojave: Header files not found. Use Perlbrew!

  • Posted on November 29, 2018 at 23:15

Having trouble in CPAN, getting messages like: fatal error: ‘EXTERN.h’ file not found.
Use Perlbrew and all your worries are gone.

$ brew install perl

$ brew link –overwrite perl

After this Perl and CPAN are installed /usr/local/bin:

$ which perl cpan




LISA Prerequisites

  • Posted on January 1, 2016 at 15:34

Super Quick Start Guide II: LISA

# pacman -Sy perl-dbd-pg
# cpan
cpan> install lib::relative
cpan> install Filesys::Df
cpan> install Moose
cpan> install namespace::autoclean
cpan> install DBI
cpan> install SQL::Abstract
cpan> install xxHash
cpan> install Filesys::DiskFree
cpan> install Filesys::Path
cpan> install Config::Simple
cpan> install Email::Send::SMTP::TLS
cpan> install Email::Simple

File names:

  • Transponder:
    Call: ./transponder/ 3
  • Heartbeat Share Checker:
    Call: .heartbeat// –runmode=3 –interval=60
  • Acquire Storage Device: lisa-dn-acquire-storage-device-1.3.1pl
    Call: ./bootdisk/lisa-dn-acquire-storage-device-1.3.1pl 3
  • Acquire Computer:
    Call: ./bootdisk/ 3

Everything you really need in Arch

  • Posted on December 13, 2015 at 18:07

Creating a list of everything installed:

# pacman -Qe | awk '{print $1 " \\" }'


apache \
atril \
autoconf \
automake \
bash \
bind-tools \
binutils \
bison \
bzip2 \
caja-gksu \
caja-image-converter \
caja-open-terminal \
caja-sendto \
caja-share \
coreutils \
cryptsetup \
device-mapper \
dcfldd \
dhcpcd \
dialog \
diffutils \
e2fsprogs \
engrampa \
eom \
fakeroot \
file \
filesystem \
findutils \
flex \
foremost \
fping \
galculator-gtk2 \
gawk \
gcc \
gcc-libs \
gettext \
glibc \
grep \
groff \
grub \
gzip \
hfsprogs \
htop \
inetutils \
iproute2 \
iputils \
jfsutils \
less \
libtool \
licenses \
lightdm \
linux \
logrotate \
lsof \
lvm2 \
m4 \
make \
man-db \
man-pages \
marco \
mate-applets \
mate-backgrounds \
mate-control-center \
mate-icon-theme-faenza \
mate-media \
mate-netspeed \
mate-notification-daemon \
mate-power-manager \
mate-screensaver \
mate-sensors-applet \
mate-system-monitor \
mate-terminal \
mate-themes \
mate-user-guide \
mate-user-share \
mate-utils \
mc \
mdadm \
mlocate \
mozo \
mtools \
nano \
net-tools \
netctl \
nfs-utils \
nmap \
openssh \
os-prober \
p7zip \
php-apache \
php-gd \
pacman \
par2cmdline \
patch \
pciutils \
pcmciautils \
perl \
perl-dbd-pg \
pkg-config \
pluma \
postgresql \
procps-ng \
psmisc \
reiserfsprogs \
rsync \
s-nail \
screen \
sed \
shadow \
sleuthkit \
sshfs \
sudo \
sysfsutils \
tar \
testdisk \
texinfo \
tree \
unrar \
usbutils \
util-linux \
vi \
vim \
vimpager \
wget \
which \
xfsprogs \
zip \

And then CPAN:


Arch LAMP: Super quick start guide

  • Posted on October 7, 2015 at 19:14

Get your terminal ready…

Install necessary packages

# pacman -S --noconfirm apache
# pacman -S --noconfirm mysql

Set DocumentRoot in /etc/http/conf/httpd.conf

Afterwards continue install PHP stuff…

# pacman -S --noconfirm php-apache
# pacman -S --noconfirm php
# pacman -S --noconfirm php-gd

Uncomment some extensions (modules) in /etc/php/php.ini

Now it’s time to configure your Virtual Hosts in /etc/httpd/conf/extra/httpd-vhosts.conf
When all is done, check your configuration and make Apache en MySQL startup automatically from now on

# apachectl configtest
# systemctl enable httpd
# systemctl enable mysql

Done! Happy webserving!



Deduplicating: EWF vs Raw

  • Posted on August 4, 2015 at 14:24

Is ‘good old’ Expert Witness Format still the preferred choice?

In the recent years huge centralized storage has become pretty much a standard everywhere. And pretty much everywhere EWF has become standard for forensics imaging.
I wonder if this is still the most optimal combination from the perspective of storage-efficiency.

How does deduplicating perform on ewf-images compared to raw? In fact, my assumption is: The more raw images saved to a deduplicating volume, the more efficient duplicating will do its job.


Let’s bring them to the test!

After booting up with a Windows 7 machine, I imaged the boot disk using EnCase 6. (run 1)
Immediately after, I initiated a second acquisition using the same EnCase session (run 2)
All settings for acquisition are kept to default, using ‘Good compression’ and a split size of 640MB.

FTK Imager
After EnCase finished both acquisition sessions successfully, I started two acquisition sessions with FTK Imager using the same approach: Start one, When it runs, start session number two.

Changing WordPress Header-text

  • Posted on September 3, 2014 at 18:38

Status change

Up until about a year ago I thought of myself as an IT-guy lacking ambition. You may have read about it.
But things can change! People can change. Your status can change…

But what if you have your status listed as an under-title in your WordPress-blog?
You would update, you say?
Yes, but how in the world can you do that in WordPress?



To cut a long story short; I didn’t really find an easy way on changing the layout of what WorPress calls the Header-text. Of course, changing the text is not a problem. But specifically changing the layout or making it an hyperlink. That’s where it gets troubling.

Finding the header-text in the database was doable:

MySQL Query: Header text

Updating using SQL was also a peace of cake. But inserting HTML-code appeared to be ‘impossible’.
WordPress, or Apache, or PHP, whoever you want to blame, just renders the HTML to unformatted text. And that is not cool!



I just edited the header.php file, and added raw HTML.
File: [apacheroot]/wordpress/wp-content/themes/purple-pastels/header.php

VIM Screenshot of header.php

This is particularly a solution that I am not proud of. But I am proud of the result!

Just have to keep in mind that an update of the theme my so beloved updated header-text will be gone.
Therefor I documented all this.