Archive for March 2012

Linux Text Editors: Vi and Nano


                When working with text editors, you pretty much choose between Vi or Nano. Vi is old school with a blank layout and no visible controls, which can make it difficult to work with for beginners. However, it is very powerful and once you learn the keystrokes it can be used very quickly to edit config files and used for scripts, etc. Nano has a pseudo-graphical layout that makes it a little easier to jump right into. Both are viable options. Vi is a standard whereas Nano has to be available depending on the Linux OS you use. We will look at both and go over the important commands for both.
Let’s look at the difference.

To start Vi, you just have to type “vi” and then the name of the file, or type any name and the file will be created anew.

Example: “vi newfile”


Vi will automatically open in Command mode. On the bottom you will see some info such as the name of the document & info on whether it is a new file or an existing one. Let’s look at an existing file.

You will see additional info for existing files and more importantly whether you have to write premissions.

Quitting & Saving

There are three modes to Vi: Command mode, Text mode & Ex Mode. If you tried to start typing in command mode you wouldn’t be able to. You need to hit the “I” in order to get into text mode. You can then get back to command mode by the ESC key. Typng “:” will put you into Ex mode.


In order to quit Vi, you have to hit the Esc key and then enter in “:” along with “q” for quit.


If you get stuck in a file that is Read-Only and you can’t quit, you can enter “:q!” with the exlamation point to force quit. If you want to save changes, hit the Esc key along with “:w”.



In short, here are the keys for saving and quiting after hitting Esc (Ex mode):
  • :w – Saves
  • :wq or :x – Save & Quit
  • :q – Quit
  • :q! – Force quit, no save

Navigation in Vi

Navigating in Vi is a little more tricky, and this is what gives new users headaches. You just want to keep your fingers on your keyboard as if you are constantly typing (i.e. h, j, k, l). These keys are the substitute for the arrow keys.
  • j – down
  • k – up
  • l – right
  • h – left
  • gg – Takes you to the beginning of the file
  • G(shift + g) – Will take you to the end of the file
  • xxG – Brings you to a specific line in the file(xx is the line number)
  • ( – Move up to the beginning of the sentence
  • ) – Move to the end of the sentence

Insterting Text

  • i – Insert before cursor position
  • a – append after cursor position
  • r – Replace letter
  • o – Open line below cursor position automatically goes into insert mode
  • O – Open line above cursor in insert mode

Deleting Text

  • x – Deletes the character under cursor position
  • X – Deletes the character before cursor
  • dw – Deletes the word after cursor
  • db – Deletes word before the cursor
  • u – Will undo changes

Copy(yank) & Paste

  • yw – Yanks the word after the cursor
  • yb – Yanks the word before the cursor
  • yy – Yanks the entire line
  • p – Will paste
  • P – Will paste before the cursor position

Search

  • / – Is used to search(:/searchword)


Setting up Vi with numbers

It might benefit some to view the documents with numbers. What you want to do is go into Exec mode(ESC) and then type in “: set number”. Let’s look at the group file:



Nano

Let’s take a look at workinig with Nano. You start out the same way as you do with Vi by just typing “nano newfile”.


The look is a lot different.


Saturday, March 31, 2012
Tag :

How to Set Up Safe FTP in Linux


                      File Transfer Protocol (FTP) is one of the oldest and most popular ways to share files between computers and servers. In terms of the Internet, this happens transparently on websites where you download software or files. FTP is available both under Windows and Linux.

 What is VSFTPD?

The vsftp daemon runs in the background and allows you or users you designate, to copy files to and from your Linux boxes, using username and password as login credentials. This ability is open to individuals or groups you may want to establish.

VSFTPD features include:
  1. Virtual IP configurations
  2. Virtual users
  3. Standalone or inetd operation
  4. Powerful per-user configurability
  5. Bandwidth throttling
  6. Per-source-IP configurability
  7. Per-source-IP limits
  8. IPv6
  9. Encryption support through SSL integration

How To Install VSFTP

The daemon is included in most versions of Linux. If you are using a Debian based distribution like Mint or Ubuntu, open a terminal window and type: sudo apt-get install vsftpd
If you are using a Red Hat based disto, open a terminal window and type: sudo yum install vsftp

How To Configure VSFTP

To configure vsftp, open the vsftpd.conf file in the /etc directory. For instance, if you were using gedit as your text editor, you would type: sudo gedit /etc/vsftpd.conf

First, for a secure setup, you’ll want to disable anonymous access to your ftp server. Change this line: anonymous_enable=YES to anonymous_enable=NO

With anonymous access disabled, you’ll want to allow local users to log in, by uncommenting the following line: #local_enable=YES to local_enable=YES (simply remove the # sign).

Allow write access by uncommenting this line: #write_enable=YES to write_enable=YES
Save and close the file.

Setup an FTP user account:
sudo mkdir -p /home/ftp/ftpuser
sudo useradd ftpuser -d /home/ftp/ftpuser -s /bin/false
sudo passwd ftpuser

Restart your ftp server:
Debian: sudo etc/init.d/vsftpd restart
Red Hat: sudo service vsftpd restart

Test:
net stat -a | grep ftp

Run at the command Line:
ftp ip address or host name: ftp 100.00.00.00

Other VSFTP Configuration Options

There are many other options you can add to this file:
  • Limiting the maximum number of client connections (max_clients)
  • Limiting the number of connections by source IP address (max_per_ip)
  • Setting the maximum rate of data transfer per anonymous login (anon_max_rate)
  • Setting the maximum rate of data transfer per non-anonymous login (local_max_rate)

VSFTP Considerations and Resources

Potential issues are often as simple as username and password entry errors. But because firewalls are designed to limit access to certain ports, this is a good area to investigate if you experience issues with your installation
Thursday, March 22, 2012
Tag :

How to Become the Worlds No. 1 Hacker Short & Simple

Every day, we hear and see in the news about constant cyber attacks, where hackers have stolen identities, taken millions of dollars, or even shut down websites and companies in their entirety. The reason why hacking will never die is because we hire IT-Managers, who are not hackers, to protect our networks. Statistics show that every 6 seconds a personal computer is hacked into. Many consumers rely on the concept that the applications that came installed on their brand new computers, are kryptonite and impenetrable by hackers. They believe and trust that the “Geek Squad”, Norton and other anti-hacker applications can protect them. However, this is entirely false!

We have all heard the adage, “In order to catch a thief, it takes a thief”, well, “in order to catch a hacker it takes a hacker.” Gregory Evans, world renowned security expert, will show you step by step what tools hackers use to get into your network. Evans will then take those same tools and show you step by step how to hack into your own network.

This guide covers:

- Installing Spyware 
- Cracking Wireless Networks
- Hacking into a computer 
- Hacking Web Servers
- Tapping VOIP telephones 
- Password Cracking
- Hacking Voicemail 
- How to make money as a Certified Ethical Hacker
- AND MUCH, MUCH MORE!!!

Download Link :-
Become the Worlds No. 1 Hacker Short & Simple
Friday, March 16, 2012

3 Useful Tools to See Who is Using Your Home Wi-Fi

                  You want to keep an eye on who’s on your home Wi-Fi. This is for a variety of reasons: people could be stealing your bandwidth, resulting in you having trouble stay within your download limits. People on your network could also potentially take note of your personal information or company information. This means you should be encrypting your data very carefully, and securing your home wireless network. Even with all these precautions, there could still be someone who manages to gain access.
Here are three tools to make sure that you have a good idea of who’s on your wireless network, and whether or not you have to watch your back.

1. Nirsoft Wireless Network Watcher

Nirsoft’s Wireless Network Watcher is the Marauder’s Map of wireless networks. It allows you to keep an eye on every computer and device that’s logged on to your network. It will display the IP and MAC address of each device, the company that manufactured the network card, and the optional computer name.
Nirsoft Wireless Network Watcher

This means that you don’t have to worry about your neighbors stealing your bandwidth. As a student (or anyone else that may be living in an apartment and consistently going over bandwidth), this little tool is pretty nifty and handy for those awkward conversations. After you track down who’s really using your network, of course, you’re on your own with the confrontation.

Simply download, install, and use.

2. Zamzom Wireless Network Tool

Zamzom presents a tool similar to Nirsoft’s. It also allows you to have a look at every user logged on to your Wi-Fi, and also displays IP and MAC addresses of each device running around your network.

Zamzom Wireless Network Tool

You can choose to perform a Fast Scan or a Deep Scan on Zamzom. If after a Fast Scan, you can’t find the problem or you’re suspecting there’s someone going for a free ride on your Wi-Fi, run a slower but more thorough Deep Scan.
There’s a premium variant of Zamzom that exists, and also gives you more insight and information into who’s on your network. (For example, you can choose to view the computer owner’s name.)
I like how Zamzom actually ended up presenting a way to ban users from your router. Have a look at the video!

3. Net View Command

You can also use good ol’ Command Prompt to have a look at who’s on your network. Hit your Windows key or the start menu, and search “cmd”. There are a ton of other tricks you can do with the Windows Command Prompt, such as sending other users pop-up messages.
Command Prompt Net View

By the way, if you ever get a System Error 6118 when you try Net View, it could be because you have the firewall on.
The best part of the Command Prompt is its inclusion with Windows. That means you don’t have to download anything to use it!

Here you’ve got three great, comprehensive methods of tracking who’s in your network. Stay safe and make sure you keep an eye on your network! Oh, and with great power comes great responsibility. Don’t abuse this power!

Logging

The appliance generates log messages to document such events as denied TCP connections,
translation slot depletion in the xlate table, console logins, and bytes transferred
for each connection in the conn table. The appliances can log to the following destinations:
the console, an internal buffer, an SNMP management station via SNMP traps,
e-mail messages, and an external syslog server. The default is to log information to the
console; however, Cisco highly recommends in a production network that you either log
to the internal buffer of the appliance or to an external syslog server.

Logging Configuration
Configuring and controlling logging is done with the following commands:
ciscoasa(config)# logging enable
ciscoasa(config)# logging buffered severity_level
ciscoasa(config)# logging console severity_level
ciscoasa(config)# logging monitor severity_level
ciscoasa(config)# [no] logging message message_ID
ciscoasa(config)# logging host [(logical_if_name)]
syslog_IP_address [tcp|udp[/port_#]]
ciscoasa(config)# logging facility facility_number
ciscoasa(config)# logging standby
ciscoasa(config)# logging device-id {hostname | ipaddress IP_address |
string text}
ciscoasa(config)# logging timestamp
ciscoasa(config)# logging trap severity_level

TIP To disable logging for a particular location, preface it with the no parameter; for example, to
disable logging to the appliance internal buffer, use no logging buffered.

Logging Verification
The show logging command displays the configuration of logging on your appliance:
asa1(config)# show logging

Logging Configuration Example
Here’s a simple example that will log messages from level 1 to 5 to the syslog server
shown previously in Dhcp Relay server configuration Figure :-
ciscoasa(config)# logging enable
ciscoasa(config)# logging host (campus) 192.168.1.4
ciscoasa(config)# logging device-id hostname
ciscoasa(config)# logging timestamp
ciscoasa(config)# logging trap 5

Cabling Cisco Devices

Unshielded Twisted Pair (UTP) is a cable that has four pairs of wires twisted inside it to eliminate electrical interference. UTP cables are connected using RJ-45 connectors that have eight connector pins. The data equipment that is used for internetworking is classified as Data Terminal Equipment (DTE e.g. router interfaces) and Data Communication Equipment (DCE e.g. A WAN connects DTEs through DCE network). 

UTP cables are used in many configurations and for different purposes, to form an internetwork including:
  • Straight-through
  • Crossover
  • Rollover
Applications of UTP include:
  • Serial transmission
  • Integrated Service Digital Network (ISDN) connections
  • Console connections
  • Modular and fixed interfaces
These configurations and applications are discussed below.

Straight-Through Cable
A straight-through cable is the standard network cable connection and is used to connect the source and destination computers through an internetworking device. Specifically, you can use it to connect a host to a hub or switch

Crossover Cable
In a crossover cable, the standard RJ-45 cable between the source and destination computers is cross-connected. A crossover cable can be used to connect:
  • Two computers
  • Two hubs
  • A hub to a switch
  • A cable modem to a router
  • Two router interfaces

Rollover Cable
These Cisco proprietary cables used to connect to a router or switch console port. In a rollover cable (8 pins), RJ-45 connectors are usually present at each ends and are used to connect router and computer ports. Pin 1 on one end of cable connects to Pin 8 at the other end of the cable, similarly, Pin 2 connects Pin 7, and so on. 

Serial Transmission
All WANs use serial transmission, which can pass one bit at a time over a single channel. Cisco provides a 60-pin serial connector for one end of the cable while other end of the cable may be EIA/TIA-232, V.35, EIA/TIA-449, X.21 or others; 

ISDN Connections
ISDN refers to a collection of standards that define a digital architecture that can carry integrated voice and data, using the public-switched network. ISDN BRI (Basic Rate Interface) is a two 64 kbps Bearer channels (2B) plus one 16 kbps Data channel (D) service. ISDN BRI terminates at the customer premise with the U interface. 

Console Connections
A console is a type of DTE through which commands are entered into the host device. Most Cisco devices support the RJ-45 console connection. A rollover cable with an RJ-45 connector is used to connect the PC or terminal to the console port of the Cisco device.

Modular and Fixed Interfaces
Unlike a fixed interface router, a modular interface router allows you to add new interface cards without buying a new router.

Pageviews

Followers

Blog Archive

Powered by Blogger.

- Copyright © 2013 Selva Sharing -Selvasharing- Powered by Blogger - Designed by @ Access -