Monday, August 19, 2019

Laptop Memory Replacement/Upgrade (ASUS X550Z)

This is to document my experience upgrading the RAM in my ASUS laptop, which unfortunately doesn't have easy access for upgrading memory, requiring complete disassembly. I imagine many laptops are built this way today, so hopefully this will be helpful to someone else.

Attempt the following at your own risk!

It should be obvious, but you'll need a screw driver that will work with your equipment. A thin plastic card or something similar is helpful with prying the keyboard face off. I also like to have a small container to keep screws in, just to make sure I don't misplace them.


Once you have your tools and your new hard drive ready, the first step is locating the screws that are holding your laptop together. Locate them and remove them.



Then you can carefully remove the keyboard. Flip the laptop back over and carefully pry from the edge, all the way around, using a thin plastic card for leverage.

For additional help, you can watch the video I made about replacing the hard drive, I show how to open the computer here: https://youtu.be/m-_m4fJMIZ8



Next, you'll need to remove all the cables connected to the mother board. Starting with the first three that you'll see when you lift the keyboard up, since they are attached to the keyboard (see video above).



With the keyboard removed, you can begin removing the rest of the cables. I like to start with the power connection to the battery in the back. Try to remember how all the wires are tucked in when it comes time to plug everything back in. You may want to document your work with pictures for reference points.



Now locate all the screws holding the motherboard down. I think I pointed them all out here, but I may have missed something.



With all the screws removed, you can remove the hard drive and cd/dvd rom. They both push out the the right:



Remove the ribbon cable if you haven't already:

Now you should be able to lift the motherboard out. There will be one more cable connected to the back that you'll be able to disconnect once you left the motherboard. You will have to pull the mother board slightly to the right, removing it from the USB mounting points on the case at the left, and then lift it out from the left side up, as the cable will be holding it down to the right.



Now you can lay the motherboard backside up to reveal the RAM


The black flap easily peels up to expose the memory.

They are each held in by a clip on each side. Pull the clips out side ways, and the memory should lift up and out.



Make sure when handling memory that you don't touch the connection plates. When you install the memory, you should be able to put it back in at the angle it came out, and then push it down. When you push it down the side clips should auto lock in to place with a click. The memory should then be secure.

Now back track your steps to re-assemble. :)

Saturday, April 13, 2019

Wireless Mode: Monitor / Packet Sniffing

The following is taking place in Kali Linux terminal:

--enable monitor mode on your wireless adapter

#ifconfig wlan0 down

--kill all processes that might interfere
#airmon-ng check kill
--!!or avoid airmon-ng check kill (which can't be reversed until rebooting) use  the following method to be able to restore NetworkManager:

#pgrep NetworkManager
--you will get a PID number

--kill NetworkManager
#kill <PID number>

#pgrep wpa_supplicant
--you will get another PID number

#kill <PID number>
--this will kill wpa_supplicant

--test this by running airodump-ng
#airodump-ng

--when you want to restore wireless functionality:
#service NetworkManager restart
#service wpa_supplicant restart

--you can test for full functionality by trying to connect to a network you never associated with before

--source: https://forums.kali.org/showthread.php?28932-Avoiding-Airmon-ng-Check-Kill-and-restarting-NetworkManager


#iwconfig wlan0 mode monitor

#ifconfig wlan0 up

#iwconfig


--Sniff Packets

--scan 2.4g
#airodump-ng <device>

-- scan 5g
#airodump-ng --band a wlan0

-scan 2.4g/5g
#airodump-ng --band abg wlan0

--log to file targeted device packets
--airodump-ng --bssid <MAC address> --channel <channel> --write <filename> < yourwireless adapter>

# airodump-ng --bssid mac --channel 6 --write test wlan0

--open in wireshark

# wireshark

--open <filename>.cap

Thursday, April 11, 2019

Changing your MAC address

The following takes place in Kali Linux Terminal:

To change your MAC address:

--ifconfig <device> down

# ifconfig wlan0 down

--ifconfig <device> hw ether <new mac adress>

# ifconfig wlan0 hw ether 00:1d:2d:3d:4d:5d

--ifconfig <device> up

# ifconfig wlan0 up


--In Kali, if your MAC address keeps resetting back to the original, you will need to edit the NetworkManager.conf file.


# leafpad /etc/NetworkManager/NetworkManager.conf

--In the file add the following lines:

[device]
wifi.scan-rand-mac-address=no

[connection]
ethernet.cloned-mac-address=preserve wifi.cloned-mac-address=preserve


--then, ctrl-s / save

-- restart network manager

# service network-manager restart

Wednesday, April 10, 2019

Debian: Realtek wireless adapter setup

This is the only process that worked for me to get a Realtek RTL8188AU wireless adapter chipset working on my Debian9 system, and also how I got it to work in VirtualBox.


Realtek RTL8188AU chipset
Reinstalling Your Realtek Wireless Driver

Install and configure rtl8812au in Debian:

# sudo apt-get install linux-headers-$(uname -r) build-essential git

# git clone https://github.com/scrivy/rtl8812AU_8821AU_linux.git
# cd rtl8812AU_8821AU_linux
# make
# sudo make install
# sudo modprobe rtl8812au
# reboot

source: https://youtu.be/SWw4KDs9jko


To get VirtualBox to recognize any USB device:

If you haven't installed the extension pack for VirtualBox then just go here and follow the directions:

https://askubuntu.com/questions/25596/how-to-set-up-usb-for-virtualbox/25600#25600

If you've already installed the extension pack you may just need to run this command:

# sudo usermod -aG vboxusers <username>

Then logout/login or reboot.
You should be able to add USB devices to virtual machines now.

Read more about guest additions on virtualbox: https://www.virtualbox.org/manual/ch04.html#idp90764336 

If your wireless adapter still wont show up in your virtualbox machine you may need to setup a device filter, if selecting the device doesn't work.

Go to the virtual OS setttings > USB and add a USB Device Filter, this way your virtual machine can pick up the USB device when you plug it in.

To get the device information for your filter, open usbview and select your device.

# usbview

Find your device in the list and fill out the filter with all the info you can.
Now when you load your virtual machine and plug in your USB device, virtualbox should route it to the virtual machine.

read more:
https://www.virtualbox.org/manual/UserManual.html#settings-usb

Sunday, February 24, 2019

Dual Display on Debian with AMD Radeon GPU

This is what worked for me to get a second display working on my Asus X550Z laptop with Linux Debian 9 OS. I'm simply going to copy and paste the section that I used from this website: https://linuxconfig.org/how-to-install-amdgpu-drivers-on-debian-9-stretch-linux

For a little more info you can head over there.

You just need to install some AMDGPU drivers

-------------------------------------------

Written by: Nick Congleton

Required Packages

There are still some packages that need to be installed and some things that need to be done to get the drivers working. The first thing you need to do is enable the contrib and non-free repositories in Debian.

Yes, the drivers are open source, but they do require firmware blobs to function properly.

In your /etc/apt/sources.list add contrib non-free after main on every line. When that's done, close your text editor and run:
# apt update && apt upgrade
You should be using apt instead of apt-get by now. apt is the newer and better command. In creating this guide, kernel 4.9 was being kept back by apt-get but installed perfectly fine with apt.

Linux Firmware

Alright, so now you're ready to install the single package that makes this possible. Because Debian doesn't ship firmware blobs by default, the required firmware is available but not installed. Install it with the command below.
# apt install firmware-linux
That's really it. Now, don't restart just yet. There is another important part.


LLVM

LLVM is required to build Mesa, and it is used by some of the graphical packages. You may be able to get by without it, but it's a good idea to make sure that your system has the right version installed, just in case.

In order for Mesa to be built with AMDGPU support, LLVM 3.9 or greater is needed. At the time of this article, 3.9 is still the latest version, but 4.0 is available as a release client.

Meanwhile, Stretch is still shipping 3.7 and 3.8 as well as 3.9. Install 3.9 or 4.X now to make sure that the older versions are not pulled in.
# apt install llvm-3.9 clang-3.9

Restart and Test

-------------------------------------------

After this procedure, my 2nd display worked.

Sunday, January 13, 2019

Create/Edit a file in Terminal

# cd Directory
# touch file.filetype
# nano file.filetype

enter content

ctrl-o (/save)
ctrl-x (/exit)

# cat file.filetype (/displays content)

//
NANO(1)                     General Commands Manual                    NANO(1)

NAME
       nano - Nano's ANOther editor, an enhanced free Pico clone

SYNOPSIS
       nano [options] [[+line[,column]] file]...

DESCRIPTION
       nano  is  a small, free and friendly editor which aims to replace Pico,
       the default editor included in the non-free Pine package.   On  top  of
       copying  Pico's  look  and  feel, nano also implements some missing (or
       disabled by default) features in Pico, such as "search and replace" and
       "go to line and column number".

EDITING
       Entering  text  and  moving around in a file is straightforward: typing
       the letters and using the normal cursor movement  keys.   Commands  are
       entered by using the Control (^) and the Alt or Meta (M-) keys.  Typing
       ^K deletes the current line and puts it in the cutbuffer.   Consecutive
       ^Ks  will  put all deleted lines together in the cutbuffer.  Any cursor
       movement or executing any other command will cause the next ^K to over‐
       write  the cutbuffer.  A ^U will paste the current contents of the cut‐
 Manual page nano(1) line 1 (press h for help or q to quit)

Install Virtual Box on Linux

You can download virtual box here: https://www.virtualbox.org/wiki/Linux_Downloads

Open terminal

You will have to prepare your system for virtual box installation, if you have not already.

Use the "su" command to gain super user access

# apt install gcc make
# apt install linux-headers-4.9.0-4-amd64
# apt install linux-headers-amd64
# cd Downloads
# dpkg -i virtualbox* (tab to get full filename)
# apt -f install

Finished!