Showing posts with label ThinkPad. Show all posts
Showing posts with label ThinkPad. Show all posts

Monday, May 28, 2018

[RESEARCH] How Secure Of Your Wifi Netowrk

Some information security experts still suggested to hide your SSID and set MAC address filtering in addition to WPA2, AES and strong passphrase setting in order to keep your wireless network secure.

However, most wireless hacking tools can unhide the hidden SSID, meanwhile, MAC address can be easily spoofed. Fortunately, there is a feature that can be used to harden your wireless network. It is namely Protected Management Frames or IEEE 802.11w even it is still not a standard since 2009.

What are Protected Management Frames (IEEE 802.11w) ?

Wi-Fi CERTIFIED WPA2 with Protected Management Frames provides WPA2 protection for unicast and multicast management action frames. Unicast management action frames are protected from both eavesdropping and forging, and multicast management action frames are protected from forging. WPA2 with Protected Management Frames augments WPA2 privacy protections already in place for data frames with mechanisms to improve the resiliency of mission-critical networks.

In order to understand how does it work for the security of a wireless network, I did some experiments for the purpose.

Hardware

(1) Home wireless router with the feature of Protected Management Frames;
(2) Android 6.0 at 2.4GHz smartphone;
(3) Android 7.0 at 5GHz smartphone;
(3) Macbook Pro (Retina Mid 2012) with macOS High Sierra (10.13.4) at 5GHz;
(4) Macbook Air (Mid 2013) with macOS High Sierra (10.13.4) at 5GHz;
(4) Lenovo Thinkpad X201s (as 2.4GHz attacker); and
(5) TP-Link Archer T4UHP (as 2.4/5GHz attacker)

Software

(1) Parrot Security OS 4.0.1 64-bit;
(2) WAIDPS 1.0 R6j; and
(3) Aircrack-NG 1.2

Lenovo Thinkpad X201s installed Parrot Security OS 4.0.1 with the latest update and running WAIDPS which is powered by Aircrack-NG 1.2 as attacker.

The home wireless router and the testing wifi devices are set to WPA2 and AES encryption. The firmware of the wireless router is up-to-date. Since the home wireless router is dual bands, 2.4GHz and 5GHz, I set some of the testing devices to 5GHz. The home wireless router is set to AP mode as I already have a wired router in the network.

Once the 4-way handshake is captured from wireless router and devices, attackers can brute force the captured packets to obtain the passphrase of the wireless router.

Experiment

The Protected Management Frames can be set to "disabled", "capable" and "required" on the home wireless router.

(a) Disabled

When the Protected Management Frames (PMF) at the wireless router is set to "Disabled". All wireless devices can be disassociated and the 4-way handshake can be captured.

(b) Capable

When the PMF is set to "Capable" at the wireless router, all devices can connect to the router without problem. However, the wireless devices can be disassociated and the 4-way handshake can be captured.

(c) Required

When the PMF is set to "Required", only Macbook Pro and Macbook Air can be connected to the wireless router and it cannot be disassociated as well as the 4-way handshake cannot be captured.

(d) extra

When the PMF is set to "Capable" and all the devices are disconnected as well as re-connected to the wireless router, the 4-way handshake can be captured.

When the PMF is set to "Required" and Macbook Pro as well as Macbook Air are disconnected and re-connected to the wireless router, the 4-way handshake cannot be captured.

Conclusion

Purchase a wireless router that equipped with Protected Management Frames feature and set it to WPA2, AES and PMF to "Required" with wireless devices that compatible to PMF, such as macOS 10.13.4.

However, not all wireless routers and/or wireless devices are equipped with this feature even it is an expensive/high-end or commercial model.

Finally, when you find a wireless router that equipped with this feature, make sure to update the firmware to the latest version often.

By the way, I am unwilling to provide the brand name of the home wireless router that I tested. Sorry for that!

That's all! See you.


Monday, February 15, 2016

HOWTO : Kali Linux 2016.1 Live USB Persistence Encryption on M.2 SSD

I (Samiux) recommend to install Kali Linux 2016.1. Live USB Persistence on M.2 SSD 128GB or higher. The M.2 SSD will be installed to an enclosure with USB 3.0 interface. I will install Kali Linux 2016.1 Live USB Persistence for Encryption only.

I (Samiux) have tried to install Kali Linux 2016.1 Live USB Persistence Encryption on 32GB USB 3.0 Pendrive. It is very very slow and insufficent space for the first update. It takes over 12 hours to update Kali Linux 2016.1 and the reboot failed. May be you can use a larger size and faster USB pendrive or an external portable SSD drive for the purpose. I find Live USB Persistence on fast device is better than dual boot on Windows, Mac or Linux computers.

This guide covers how to install Kali Linux 2016.1 Live USB Persistence Encryption for Apple Macbook (Air/Pro/Pro Retina) and Lenovo ThinkPad (X201s or newer). However, this guide does not suitable for The New Macbook as it does not display "Windows" when pressing "Option" during boot up. Therefore, this guide may not work for all models of Mac machine.

Step 1 :

You need a Linux computer (such as Ubuntu) to do the following steps. If you do not have gparted install, you can install it.

If you are using Ubuntu, you can :

sudo apt-get update
sudo apt-get -y install gparted


Step 2 :

Download Kali Linux 2016.1 from official site. I download amd64 version. Install it to M.2 SSD 128GB.

Usually, M.2 SSD will be mounted at "/dev/sdb". You can confirm it when running "fdisk -l".

If you are using Ubuntu, you can :

sudo dd if=kali-linu-2016.1-amd64.iso of=/dev/sdb bs=1024k

Step 3 :

Do not unplug the M.2 SSD. Run gparted and format the remained space to ext3 (ext4 should work but not yet tested).

Step 4 :

The M.2 SSD is still inserted to USB port. Run the following commands :

If you are using Ubuntu, you can :

cryptsetup --verbose --verify-passphrase luksFormat /dev/sdb3
cryptsetup luksOpen /dev/sdb3 my_usb

mkfs.ext3 -L persistence /dev/mapper/my_usb
e2label /dev/mapper/my_usb persistence

mkdir -p /mnt/my_usb
mount /dev/mapper/my_usb /mnt/my_usb
echo "/ union" > /mnt/my_usb/persistence.conf
umount /dev/mapper/my_usb

cryptsetup luksClose /dev/mapper/my_usb


* Make sure you enter a very strong passphrase for the encryption

Step 5 :

Then reboot the M.2 SSD.

If you are using Macbook, you should long press "Option" key when boot up. Once the boot menu is displayed, select "Windows" icon to boot.

If you are using ThinkPad, you should press "F12" to launch the boot menu when boot up. Once the boot menu is displayed, select the M.2 SSD to boot.

Once Kali Linux boot menu is displayed, select "Live USB Encrypted Persistence". You will be asked for Passphrase when boot to unlock /dev/sdb3.

Step 6 :

On Kali Linux 2016.1 Live USB Persistence, you run the following commands :

apt-get update
apt-get -y install dkms linux-headers-amd64 tlp tlp-rdw

wget http://ftp.wa.co.za/pub/ubuntu/ubuntu/pool/restricted/b/bcmwl/bcmwl-kernel-source_6.30.223.248+bdcom-0ubuntu2.1_amd64.deb
dpkg -i bcmwl-kernel-source_6.30.223.248+bdcom-0ubuntu2.1_amd64.deb


If you are using ThinkPad, you need this command. However, it is no harm to install it when you are using Macbook :

apt-get -y install tp-smapi-dkms acpi-call-dkms

Step 7 :

If you are using Macbook, you need this step. However, it is no harm to set it up when you are using ThinkPad.

nano /usr/local/bin/mac_keyboard

Enter the following :

#!/bin/bash

# Author : Samiux (http://samiux.blogspot.com)
# Date : Feb 15, 2016

if [ -f /sys/module/hid_apple/parameters/iso_layout ]
then
    echo 0 > /sys/module/hid_apple/parameters/iso_layout
    echo 1 > /sys/module/hid_apple/parameters/fnmode
fi


Save it with "Ctrl o" and "Ctrl x".

chmod +x /usr/local/bin/mac_keyboard

Step 8 :

If you are using Macbook, you need this step. However, it is no harm to set it up when you are using ThinkPad.

nano ~/.config/autostart/mac_keyboard.desktop

Enter the following :

[Desktop Entry]
Type=Application
Exec=/usr/local/bin/mac_keyboard
Hidden=false
X-GNOME-Autostart-enabled=true
Name[en_US]=Mac Keyboard Layout
Name=Mac Keyboard Layout
Comment[en_US]=Start Mac Keyboard Layout when GNOME starts
Comment=Start Mac Keyboad Layout when GNOME starts


Step 9 :

nano ~/update_kali

Enter the following :

apt-get update
apt-get -y dist-upgrade
apt-get autoclean
apt-get -y --purge autoremove


Save it with "Ctrl o" and "Ctrl x".

chmod +x ~/update_kali

Step 10

Then update Kali to the latest status. It takes time to update. However, when the kernel is updated, the update process will be failed as it cannot update the kernel and its related packages.

cd ~
./update_kali


Step 11

Change your time zone when necessary.

dpkg-reconfigure tzdata

Step 12

Make sure you change the root password on every boot up.

passwd

* Make sure you entered a strong password and it should be difference to the encryption passpharse

Know Issue

The New Macbook is not supported. It may not working on all models of Mac machine.

"maltego" on Kali Linux 2016.1 refuses to launch on my Macbook Air (Mid 2013), Macbook Pro Retina (Mid 2012) and ThindPad X201s even it is not in Live USB Persistence mode, maybe it is a bug for older CPU.

REFERENCE

TLP Setting
Broadcom Wireless Driver
Kali Linux Live USB Persistence


That's all! See you.

Source : Samiux's Blog


Tuesday, February 10, 2015

HOWTO : Thinkpad Touchpad Malfunction Fixed on Kali Linux 1.0.9a


This guide also works for Kali Linux 1.1.0

My friend has a Lenovo Thinkpad New X1 Carbon. However, the touchpad is malfunction and caused the system hang up. Fortunately, he followed this WiKi (except the "The syndaemon Helper", if included, you cannot login.) the problem is solved.

That's all! See you.

Friday, April 05, 2013

HOWTO : Customize Pentoo 2013.0 RC1.1

Once you installed and updated Pentoo 2013.0 RC1.1, you may consider to install some packages on it. I selected some of them for the installation.

sudo emerge -av galculator
sudo emerge -av shutter
sudo emerge -av radiotray
sudo emerge -av preload
sudo emerge -av xfce4-weather-plugin
sudo emerge -av gtk-recordmydesktop
sudo emerge -av gnome-system-monitor
sudo emerge -av xfce4-kbdleds-plugin
sudo emerge -av xfce4-cpufreq-plugin
sudo emerge -av gnome-media


If you need LibreOffice, you need to install it but it will take a very long time to compile from source code :

sudo emerge -av libreoffice

*** If you have a very slow CPU or do not want to compile LibreOffice from source, you can install the binary package instead if it is available :

sudo emerge -av libreoffice-bin

Installation of Network Manager

If you do not like the Wicd and will use VPN or mobile network (such as 3G) :

sudo emerge -av networkmanager
sudo emerge -av networkmanager-pptp
sudo emerge -av networkmanager-openvpn
sudo emerge -av networkmanager-vpnc
sudo emerge -av nm-applet


Then make it boot by default :

rc-update add NetworkManager default

Now, set to load GNOME service on boot :

Menu -- Settings -- Session and Startup -- Advanced

Select "Launch GNOME services on startup"

*** Make sure you unselect the Wicd at "Application Autostart".

Then, reboot your box.

Installation of GPointing Device Settings

sudo emerge -av gpointing-device-settings

Menu -- Settings -- Session and Startup -- Application Autostart

Select "GNOME Settings Daemon"

If you have ThinkPad with TrackPoint, you may need to set the Firefox to use the middle button :

Firefox -- Edit -- Preferences -- Advanced -- General

Select "Use autoscrolling"

Then, all the hotkeys of ThinkPad should work.

Installation of 3G USB Modem

sudo emerge -av usb_modeswitch
sudo emerge -av modemmanager


Add user to the group of plugdev :

sudo gpasswd -a samiux plugdev

Then, reboot your box.

Bonus #1

To make your Pentoo more secure by append the following to /etc/fstab :

tmpfs /tmp tmpfs noexec,nosuid,nodev,mode=1777,size=512M 0 0

*** Make sure the size is large enough for Pentoo to compile packages when update/upgrade. Or, simply DO NOT set this settings.

Bonus #2

If you are using hard drive and want to make Pentoo more faster, you can edit the /etc/fstab as the following :

/dev/sda1 /boot ext2 noatime,nodiratime,defaults 0 1
/dev/sda2 swap swap defaults 0 0
/dev/sda3 / ext4 noatime,nodiratime,defaults 0 1


If you are using SSD, you can :

/dev/sda1 /boot ext2 noatime,nodiratime,defaults 0 1
/dev/sda2 swap swap defaults 0 0
/dev/sda3 / ext4 discard,noatime,nodiratime,defaults 0 1


It will look like the following :



That's all! See you.