Skip to content

Just another technical day

Somethingk: Tech Blog

  • Home
  • About

Backtrack DNSEnum

By K4Paul February 5, 2012 May 12, 2013 0 Backtrack, Enumeration, Penetration Testing Backtrack, Command, DNSEnum

This tool can retrieve host addresses, name servers, MX records, sub domains, whois performances and reverse lookups for netblocks. It performs a quick enumeration.

Command Use:

  • cd /pentest/enumeration/dns/dnsenum
  • ./dnsenum.pl –-enum –f –r <target website>

The flags allow for a powerful scan including sub domains.

Backtrack Metagoofil

By K4Paul February 5, 2012 May 12, 2013 0 Backtrack, Enumeration, Penetration Testing Backtrack, Command, Footprinting, Google, Metagoofil

This tool will use google to search a domain for given file types and extract the metadata to a viewable HTML file. It is part of the footprinting stages of penetration testing.

Command Use:

  1. cd /pentest/enumeration/google/metagoofil
  2. ./metagoofil.py –d <domain to search> -f <file type or all> -o <output html file name> -t <location to download files>

Backtrack Goohost

By K4Paul February 5, 2012 May 12, 2013 0 Backtrack, Enumeration, Penetration Testing Command, Footprinting, Goohost

This is a tool used to extract hostnames, subdomains, IP and email addresses from a given domain through information from google. It is part of the footprinting stages of penetration testing.

Command Use:

  1. cd /pentest/enumeration/google/goohost
  2. ./goohost.sh <domain>

Backtrack theHarvester

By K4Paul February 5, 2012 May 12, 2013 0 Backtrack, Enumeration, Penetration Testing Footprinting, theHarvester

This tool is used to gather e-mail accounts, usernames, hostnames, subdomains from public sources such as google, bing and Linkedin. In penetration testing, this is part of performing enumeration or footprinting a network

Supported sources are:

  • Google – emails, subdomain and hostnames
  • Google profiles – locate employee names connected with the domain
  • Bing search – emails, subdomain, hostnames and virtual hosts
  • Linkedin – locate employee names connected with the domain
  • Exalead – emails, subdomain and hostnames

 Command Use:

  1. cd /pentest/enumeration/theharvestor
  2. ./theHarvester.py –d <target site> -l <max number of  returned results> –b <source of gathering, ex: google>

Ping Sweep

By K4Paul February 5, 2012 March 24, 2017 0 Fingerprinting, Linux, Network Capture, Windows CMD, Command, FOR, Loop, Ping, Ping Sweep, Scan, Terminal

nmap is a great tool to use to perform a network ping sweep, however there is an effective way to perform a ping sweep with out any additional installation. A FOR loop can be used to perform consecutive pings.

Ping Sweep FOR Loop: FOR /L %i in (<Host Number Start (0-255)>,1,<Ending Host Number (0-255)>) do @ping -n 1 <Network Prefix>.%i | find “Reply”

The FOR loop is basically saying start at a network prefix with stated starting host number value and send a ping. Once a reply as been received the first loop is finished and it continues to the next loop. After each loop, the host number increases and a ping is sent to that address on the network. For example, say the network prefix is 192.168.0 and we want to ping host numbers (3-43). We would enter 3 as our beginning host number and 43 as are finishing host number. The one in between the two parameters states to increase each address by one for each running of the for loop. This allows us to ping each host on the the specified network range, thus performing a ping sweep.

Windows Example:

The following command ping sweeps addresses in range 192.168.100.0 – 192.168.100.255

FOR /L %i in (1,1,255) do @ping -n 1 192.168.100.%i | find "Reply"

The same function can be done in the Linux Terminal.

Linux Ping Sweep:

Linux is slightly different but follows almost the same pattern.

for i in {0..255}; do ping -c 1 -t 1 <IP PREFIX>.$i | grep 'from'; done

Mount a Network Drive Linux

By K4Paul February 5, 2012 May 12, 2013 0 Linux Command, Mount, Network Drives, Terminal

Mount a Linux Drive in Linux Machine:

  1. Create a directory for mount: mkdir /<mount place>
  2. Mount Drive: mount <Linux file system address>:/<share> /<mount place>
  3. View Contents of mounted drive: ls /<mount place>

Mount a Windows Drive in a Windows Machine:

  1. Create a directory for mount: mkdir /<mount place>
  2. Mount Drive: mount -t smbfs //<file system address>/<share> /<mount place> -o username=<username>,password=<password>
  3. View contents of mounted drive: ls /<mount place>

 

In a Linux machine, for a Windows Drive, it is required to state that the drive uses a Samba File System. This will notify Linux of how to read the drive.

Termainl User Commands

By K4Paul February 5, 2012 May 12, 2013 0 Linux Add User, Command, Terminal, User

List Users: cat /etc/passwd | grep “/home” |cut -d: -f1 && cat /etc/passwd | grep “/root” |cut -d: -f1

The Command ‘cat /etc/passwd | grep “/home” |cut -d: -f1’ on its own will list all the users found in the home directory. However root is not found in that directory so I added the additional statement to grep users in the /root directory, which will be root.

Add User: adduser <username> OR useradd <username>

Remove User: userdel <username>

Create User gGoup: groupadd <group name>

Add User to a Group: usermod -a -G <group name> <username>

Remove user:

  1. vi /etc/group
  2. Find the group and delete the user from it’s details
  3. Save File (Hit ESC then type :wq ENTER)

to

Delete Group: groupdel <group name>

CMD Mount a Network Drive

By K4Paul February 5, 2012 May 12, 2013 0 Windows CMD, Command, Mount, Network Drives

Command: net use <drive letter>: /persistent:yes  \\<computer address or name>\<share name> /u:<username> <password>

Command to display drive’s directory root contents: dir <drive letter>:/

Editing the Registry in CMD

By K4Paul February 5, 2012 May 12, 2013 0 Windows CMD, Command, Registry

Command to display: reg query <registry keyname> /v <value name>

Command to change value: reg add <registry keyname> /v <value name> /t <type: DWORD, etc.> /d <data> /f

Registry keyname – complete registry key name

/v – adds or changes a value

/t – The type of value: REG_BINARY, REG_DWORD…

/s – specifies the character used to separate strings

/d – data assigned to a value

/f – forces overwriting of existing values with prompting

***Registry values manage computer settings and operations. If a registry is incorrectly changed or deleted, the computer might not startup or run.

CMD Firewall Commands

By K4Paul February 5, 2012 May 12, 2013 0 Windows CMD, Command, Firewall

Display Firewall Settings: netsh advfirewall firewall show rule name=all

Disable the Firewall: netsh advfirewall set allprofiles state off

Re-enable the Firewall: netsh advfirewall set allprofiles state on

Posts navigation

Older posts
Newer posts
Connect with me on Linkedin

Categories

Recent Comments

  • Jk on Reordering an Array Based on Another Array’s Order in Javascript
  • LDLC_KolDzeRa on Simple AVL Tree in C++
  • vepambattu chand on Reordering an Array Based on Another Array’s Order in Javascript
  • Unknown on OpenVAS Quick and Easy: Scheduling and Running Tasks
  • K4Paul on Javascript Mousemove Scroll Event
Boka WordPress Theme By ThemeTim