Saturday, March 2, 2013

Laptop Rebuild Part Deux


I needed a different laptop. I previously had the ASUS G74SX RH71 laptop. I was warned about this ironically several years ago, do not get a 17" heavy laptop. It is cool in the beginning, but your back and knees will kill YOU. Seriously. Anyway, I had to get a lighter laptop with a good CPU, good amount of memory (which was most important) and quick hard drive(s). I decided to go back with HP. I needed something as light as Macbook Pro, but not as expensive since I did not want to take out a loan just for the laptop. I decided on the HP Envy DV6-7214 with Quad-core I7, 750 GBs hard drive, GeForce GT 650M and 8 GBs of RAM.

First, switch out the 8 Gbs of RAM for 16 Gbs. OffSec vm's should run fine with that. Next, make a DVD image of the factory setup. You never know. It will take a while, but if you ever need to go back to factory OS, you can. Next, switch the hard drive for a solid state hard drive. Now, this presented a problem because the previous laptop allowed two hard drives. The new HP laptop only allows one. The hard drive would have to be big enough for two environments. I went with the Samsung 840 Series SSD hard drive with 500 GBs of space. That should be enough for both environments. I will dual boot between Windows and Ubuntu. Ubuntu will have VMware on it so it will need just a little more space to handle the vm's. Next step, gather all info from the previous laptop including bookmarks, docs and offsec notes. Grab the latest ISO of backtrack 5 R3. Then, for good measure, make a list of the drivers for the new laptop. It just makes life easier when you are in between installs and you have a driver that is not working correctly. You can hop on another box and start looking up drivers. Done.

Now, I started the usual process of installing Windows 8 first and customizing the laptop. That was kind of painless. The usual apps and patches to install which will take forever. Next, let's install Backtrack. This is where the beginning of the problems started. Of course, Windows 8 has the UEFI issues during boot. You can either disable it in the HP BIOS by disabling "Secure Boot" or use "Boot Repair" so it recognizes the Ubuntu partition. I ended up doing both but just not at the same time.  (https://help.ubuntu.com/community/Boot-Repair). I did the "boot repair" and it worked perfectly. I changed the bios setting later on so it would not cause anymore of a hassle. So now, the dual boot is working. Then, I booted into backtrack and it did not load modules for the wireless card. In addition, the video card seemed off. Here is a discovery I found out about this laptop. It is one of the Optimus laptops (http://www.nvidia.com/object/optimus_technology.html) that comes with the NVidia card and the Intel 4000 graphics card. I think this technology is utter garbade.  Just a personal opinion but I would rather deal with my power issues. I purchased a laptop with NVidia video card, not a laptop with a sometimes on NVidia video card. Get outta here. Garbage. Anyway, there is information all over the Internet for this problem:

(http://samiux.blogspot.hk/2012/10/howto-nvidia-optimus-on-backtrack-5-r3.html)
(http://askubuntu.com/questions/36930/how-well-do-laptops-with-nvidia-optimus-work)
(http://www.howtogeek.com/124685/how-to-make-nvidias-optimus-work-on-linux/)
(https://wiki.archlinux.org/index.php/Bumblebee)
(http://www.martin-juhl.dk/2011/05/optimus-on-linux-problem-solved/)
(https://github.com/Bumblebee-Project/Bumblebee/wiki/Install-and-usage)
(http://www.aigarius.com/blog/2011/05/24/nvidia-optimus-fail/)

I just settled on installing the Intel card with the highest driver for the 10.04 kernel for Ubuntu. I had to have suffered a week and a half trying to get everything to work. I did get it to all work, but I also wanted Compiz working and some other little minor things. I tried upgrading the kernel on Backtrack which I do not recommend anyone to do. The highest I could get it up to without blowing up everything was 3.2.18 (http://kernel.ubuntu.com/~kernel-ppa/mainline/). It is not worth it. The video still looks like crap anyway. I figured I would just deal with it. Now, the wireless card, was shorter. Ultimately, you have to get the 3.5 kernel wireless drivers on the box. Credit: (http://askubuntu.com/questions/215498/upcoming-support-for-qualcomm-atheros-ar9565-wireless).  I ended up searching for the drivers here: (http://wireless.kernel.org/en/users/Download/stable/) and (https://backports.wiki.kernel.org/index.php/Releases). The wireless card was able to connect to my network and I was able to use Kismet, aircrack-ng and reaver. I could have stopped here. Deal with crappy video and use Backtrack 5 R3. But I started all over again. I tried a million ways to get everything working the way it did in the old laptop. Nope. So I finally took some smart advise from the guys at (http://www.ethicalhacker.net). You should not use Backtrack as your daily OS. Specifically, Sil, cd1zz and MaXe, I do believe they suggested you use a different distro and just add the tools you need. Well, looks like I am starting over. Windows 8 & Ubuntu.

I started with the latest version Ubuntu. With that install, I learned a few things. I hate Unity. I hate it. Like really hate it. It is a personal choice. I am sure millions love it. I just hate. Secondly, I like Gnome-shell a lot more. I install Gnome (3) shell and it looks fine. I wish that was the default. Next, Ubuntu 12.04 has all the normal compiz settings and functions. So I figured why not. So now, Ubuntu is installed but the wireless is not working. No problem. Upgraded the kernel to 3.7 and the video and wireless was working great even the Intel graphics card working well enough. Now, let's get all the programs installed and working.

* Minor Ubuntu tweaks
(http://www.noobslab.com/2012/04/install-ubuntu-tweak-070-on-ubuntu.html)
(http://askubuntu.com/questions/174292/how-can-i-move-all-the-window-controls-to-the-right)
(http://askubuntu.com/questions/24946/how-do-i-disable-the-drum-beat-sound-on-the-login-screen)  ** Disables drum sound on boot


* Backtrack Repository
(http://www.itworld.com/software/322558/add-backtrack-security-repository-ubuntu-1210-or-1204)
(http://www.otsglobal.org/backtrack-5-on-ubuntu-12-04-how-to-add-backtrack-repository-to-ubuntu-12-10.html)
(http://www.ubuntubuzz.com/2011/09/install-backtrack-5-application-in.html)
(http://zitstif.no-ip.org/bt5/toolslist.txt)

* Scapy
(unixrulz.blogspot.com/2012/11/install-scapy-on-ubuntu.html)
sudo apt-get update
sudo apt-get install python-scapy python-pyx python-gnuplot python-crypto

* Spike
http://www.immunitysec.com/resources-freesoftware.shtml
I just used the Backtrack repository for this one.

VLC
Hexedit
OpenOffice
Synaptic
UFW/GUFW
WireShark  (remember to set with: gksu wireshark)
KCalc
TouchPad Indicator
NoteCase
Compiz
Gimp
Tsclient
Xchat
Elinks
xscreensaver-gl
rss-glx
nautilus-open-terminal
kismet
basket
discover
dsniff
ettercap-graphical
backtrack-wallpaper
cowpatty
cryptcat
curl
dnsenum
dns2tcp
dnsmap
dnsrecon
dnswalk
exploitdb
fping
fragroute
fragrouter
giskismet
grendel-scan
hping3
hydra
xhydra (hydra-gtk)
ike-scan
traceroute
john
macchanger
medusa
md5deep
nbtscan
ncrack
nessus
netcat-traditional
netdiscover
ophcrack
onesixtyone
p0f
proxychains
proxytunnel
ptunnel
rar
samdump
samdump2
scapy
sfuzz
sickfuzz
snmpenum
smtpscan
smbclient
spike
sqlmap
sqlninja
sslscan
socat
tcpreplay
telnet
tcpdump
tcptraceroute
truecrypt
zip
unzip
gufw
ufw
vim
w3af (manual download?)
webshag
websecurify
wfuzz
wine
wordlists
windows-binaries
reaver
xprobe2
yersinia
dirbuster
python-pyopenssl
Unrar
sendmail (remember to setup the boot runlevel)

* Aircrack-ng
(http://www.riyazwalikar.com/2010/12/installing-aircrack-ng-on-ubuntu-1204.html)
(http://www.aircrack-ng.org/downloads.html)
You can install from the site or use the backtrack repository

* Spotify
(http://www.spotify.com/us/download/previews/)
* Add this line to your list of repositories by
* editing your /etc/apt/sources.list
deb http://repository.spotify.com stable non-free
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 94558F59
sudo apt-get update
sudo apt-get install spotify-client

* VMware Workstation 9.0.1
(http://slackblogs.blogspot.com/2012/11/vmware-workstation-901-and-linux-kernel_18.html)
(http://rglinuxtech.com/2012/11/18/vmware-9-0-1-not-so-clever-after-all/)

It was suggested to create symbolic links but I just did this:

****** Solve VMware problem!
/usr/src# cd linux-headers-3.7.0-030700-generic/
/usr/src/linux-headers-3.7.0-030700-generic# cd include/generated/uapi/linux/
/usr/src/linux-headers-3.7.0-030700-generic/include/generated/uapi/linux# ls
version.h
/usr/src/linux-headers-3.7.0-030700-generic/include/generated/uapi/linux# cp version.h /usr/src/linux-headers-3.7.0-030700-generic/include/linux/
/usr/src/linux-headers-3.7.0-030700-generic/include/generated/uapi/linux#
*************

Of course, when I upgrade to 3.7.5, I got the same errors with VMware Workstation. However, I just did the same thing and it works with kernel 3.7.5 too!!!!

No comments:

Post a Comment