The next 9-11?

09. Nov. 2016 - And the winner is: Donald J. Trump! - Make America great again? - but without me!!!

I don't visit the Trump country until Trump is dumped!

Bye, bye America

Wireshark as 'normal' user (Debian / Kali)

$ sudo apt-get install wireshark
$ sudo dpkg-reconfigure wireshark-common 
$ sudo usermod -a -G wireshark $USER
$ gnome-session-quit --logout --no-prompt

Tools for gathering network informations

  • dmitry (Deepmagic Information Gathering Tool)
  • maltego
  • nmap (Network Mapper)
  • netdiscover
  • p0f
  • xprobe2
  • hping3

Questionmark User Conference, Miami/FL, 04-12-16/04-15-16

CAM00012-30.png

20160416_164913.jpg

Search and Replace multiple Textfiles

There are different ways to search and replace text in real text files (like XML, XSL, Source-Code, TXT ecc.)

  • Notepad++ (Windows)
  • Midnight Commander (Linux) / Double Commander (Windows)
  • Command-line tools like "sed" (the option "-i.bak" stores a *.bak-file of each file that has changed) or "perl"
    • ~$ sed -i.bak 's/[search]/[replace]/' filenames.txt
    • ~$ perl -pi -e 's/[search]/[replace]/' filenames.txt
  • You can combine the "sed" and "perl" commands with find, to change files in subdirectories:
    • ~$ find /path/for/find -type f -name '[filename-pattern]' -exec sed -i.bak 's/[search]/[replace]/' {} \;

Laravel - Installation - Composer (Linux)

What do we need? Apache (or compatible), PHP >= 5.4.x

Go to: https://laravel.com/docs/5.0 for Laravel

and: https://getcomposer.org/ for installation of "Composer"

On the "Composer Website" click on "Download"

# get the composer-setup.php
php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php
# check the hashes php -r "if (hash('SHA384', file_get_contents('composer-setup.php')) === '41e71d86b40f28e771d4bb662b997f79625196afcca95a5abf44391188c695c6c1456e16154c75a211d238cc3bc5cb47') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
# install composer in the directory /usr/local/bin as "composer" php composer-setup.php --install-dir=/usr/local/bin --filename=composer

After all, you can use the program "composer" directly with /usr/local/bin/composer or set the PATH to "/usr/local/bin": export PATH=$PATH:/usr/local/bin in the ~/.bashrc

Tele2 root passwort (Österreich)

Problem: Kein root-Zugriff auf den Router (Comtrend VI 3223u ADSL)

Lösung

  • mit dem default user auf http://192.168.1.1 einloggen (user/user)
  • den Bereich "Management->Settings->Backup" auswählen und ein Backup (file: backupsettings.conf) erzeugen
  • die Datei "backupsettings.conf" mit einem Editor öffnen und den Bereich wählen:
 <X_BROADCOM_COM_LoginCfg>
      QW5QaTRkUlUhMQA=
      U3U5b3I3NFUhIQA=
      cGVubmVyaW4xOTc3AA==
   

  • hier stehen die Passwörter base64 verschlüsselt, das root-Passwort z.B. als "AdminPasswort"
  • unter Linux in der Shell den Befehl: echo "QW5QbmV3NFUhIQA=" | base64 --decode && echo eingeben oder online, z.B. unter https://www.base64decode.org/
  • root-Passwort lautet also: AnPnew4U!!

tele2-pw-root.png

  •  oder mit der Powershell: 

    [System.Text.Encoding]::ASCII.GetString([System.Convert]::FromBase64String("QW5QbmV3NFUhIQA="))

AnPnew4U!!

GNU/Linux - Boot time

To identify slow processes or services at the boot time use dmesg:

~$ dmesg --show-delta --color=always | less -R

dmesg-show-delta.png

Output of dmesg

Or use the command systemd-analyze to see how long the startup process needs to boot.

Avoid brute-force attacks

To avoid brute force attacks against SSH or e.g. Logins on Websites you can use "fail2ban" (man (1) fail2ban).

Check broken links

Online Tools

W3C Link Checker

GNU/Linux

LinkChecker - a tool written in Python

linkchecker.png

IIS 7.x

Finding difficult reproducible errors

If you have the problem that your IIS Webserver produces sometimes errors like "500 - Internal Server Error" or "The page cannot be displayed because an internal server error has occurred.", you should install and enable a module called "Failed Request Tracing". This module will help you to trace errors that happen intermittently, and are hard reproduce manually.

More infos about how to install, enable and use FRT:

Trace Failed Request

Paypal fuck off

My friend sends me 500 euros. On my paypal account I see the money, but it frozen for about 21 days. That's the information.

Now, the 21 days are gone and the information remains.

Paypal -> fuck off!!!

I shall close the account and shall never use paypal.