Configure MD5 encrypted passwords for users on Cisco IOS
The enhanced password security in Cisco IOS introduced in 12.0(18)S allows an admin to configure MD5 encryption for passwords. Prior to this feature the encryption level on Type 7 passwords used a week encryption and can be cracked easily and the clear text password (type 0) as anyone would know is completely insecure. Anyone who can gain access to the privilege mode can view/decrypt these passwords.
To configure enhanced password security, create a user with MD5 password encryption as follows from the Global configuration mode:
MD5 Encryption on clear text password:
You can enter a clear text password which will be encrypted using MD5 algorithm
where ciscoadmin is the user and his clear text password "ciscopass" which will then be converted into a MD5 encrypted text.ciscorouter(config)# username ciscoadmin secret ciscopass
This is equivalent to
where "0" [default] indicates MD5 encryption on a clear text password.ciscorouter(config)# username ciscoadmin secret 0 ciscopass
MD5 encrypted text as password
To enter an MD5 encrypted password instead of a clear text password
where "5" indicates the entered password is a MD5 encrypted text.ciscorouter(config)# username ciscoadmin secret 5 $1$feb0$a104Qd9UZ./Ak00KTggPD0
To verify the logins with MD5 encryption,
Clear Text password
ciscorouter# show running-config
!
version 12.2
no service single-slot-reload-enable
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname ciscorouter
!
logging rate-limit console 10 except errors
no logging console
enable secret 0 $1$53Ew$Dp8.E4JGpg7rKxQa49BF9/
!
username ciscoadmin secret 5 $1$fBYK$rH5/OChyx/!
…
…
MD5 encrypted text entered as password
ciscorouter# show running-config
!
version 12.2
no service single-slot-reload-enable
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname ciscorouter
!
logging rate-limit console 10 except errors
no logging console
enable secret 5 $1$feb0$a104Qd9UZ./Ak00KTggPD0
!
username ciscoadmin secret 5!
ip subnet-zero
Here the MD5 encrypted password entered itself is not displayed against the username
Friday, March 16, 2012
Authentication server
An authentication server is an application that facilitates authentication of an entity that attempts to access a network. Such an entity may be a human user or another server. An authentication server can reside in a dedicated computer, an Ethernet switch, an access point or a network access server
Authentication is the process of determining whether someone or something is actually who or what it declares itself to be. When a potential subscriber accesses an authentication server, a username and password may be the only identifying data required. In a more sophisticated system called Kerberos, the subscriber must request and receive an encryptedsecurity token that can be used to access a particular service. RADIUS (Remote Authentication Dial-In User Service) is a commonly used authentication method. TACACS+ (Terminal Access Controller Access Control System Plus) is similar to RADIUS but is used with Unix networks. RADIUS employs UDP (User Datagram Protocol) and TACACS+ employs TCP (Transmission Control Protocol.
Some specialized authentication servers employ smart cards or biometric verification in addition to one or more of the above mentioned technologies
RSA algorithm (Rivest-Shamir-Adleman)
How the RSA System Works
The mathematical details of the algorithm used in obtaining the public and private keys are available at the RSA Web site. Briefly, the algorithm involves multiplying
two large prime numbers (a prime number is a number divisible only by that number and 1) and through additional operations deriving a set of two numbers that constitutes the public key and another set that is the private key. Once the keys have been developed, the original prime numbers are no longer important and can be discarded. Both the public and the private keys are needed for encryption /decryption but only the owner of a private key ever needs to know it. Using the RSA system, the private key never needs to be sent across the Internet.
The private key is used to decrypt text that has been encrypted with the public key. Thus, if I send you a message, I can find out your public key (but not your private key) from a central administrator and encrypt a message to you using your public key. When you receive it, you decrypt it with your private key. In addition to encrypting messages (which ensures privacy), you can authenticate yourself to me (so I know that it is really you who sent the message) by using your private key to encrypt a digital certificate. When I receive it, I can use your public key to decrypt it. A table might help us remember this.
To do this
|
Use whose
|
Kind of key
|
Send an encrypted message
|
Use the receiver's
|
Public key
|
Send an encrypted signature
|
Use the sender's
|
Private key
|
Decrypt an encrypted message
|
Use the receiver's
|
Private key
|
Decrypt an encrypted signature (and authenticate the sender)
|
Use the sender's
|
Public key
|
Tag :
Hacking/Security
Linux File Permissions
What we’ll cover in this article is how to identify permissions for files & directories and how to change them, as well as changing ownerships, groups, etc. Depending on what you want to do, you’ll want to make sure you have the appropriate permissions (obviously), so let’s find out how to change them.
Let’s start by making a file we can use.
I issued the “touch” command to make a file creatively named testfile.
Touch will just create an empty file but has all the same attributes as an actual file. You can see this by using “ls –l.” Commands :
- touch test file
- mkdir workfolder
The permisions are broken into 4 sections
chmod – adds and removes permissions
If you wanted to add or remove permissions to the user, use the command “chmod” with a “+” or “–“, along with the r (read), w (write), x (execute) attribute followed by the name of the directory or file.
chmod +rwx “name of the file”
chmod –rwx “name of the directory”
chmod –wx testfile – this would take out write and executable permissions
You’ll notice that this only changes the permissions for the owner of the file, in this case roman
Changing Permissions for the Group Owners & Others
The command is similar to what we did before, but this time you add a “g” for group or “o” for users
chmod g+w testfile
chmod g-wx testfile
chmod o-rwx workfolder
chmod ugo+rwx workfolder – will give read, write, execute to everyone
chmod a=r workfolder – will give only read perission for everyone
chgrp – changing groups of files & directories
Another useful option is to change file permission to the group owning the file. Perhaps you create the files, but people on the db2 team can write/execute as well. We use chgrp for this purpose.
chgrp sales testfile
chgrp sales workfolder
This give sales control of the file & then I can take away permissions for everyone else
Note: The group must exit before you try to assign groups to files and directories
chown – changing ownership
Another helpful command is changing ownerships of files and directories. The command is “chwon” along with “name of new owner” & “name of file.”
chown tom testfile
chown tom workfolder
We can also combine the group and ownership command by
The above command gives tom the ownership of the directory tsfiles, and all files and subfolders. The -R stands for recursive which is why all sub folders and files belong to tom as well
As opposed to: chown tom workfolder
This command will give ownership to tom but all sub files and directories still belong to the original owner. The -R will transfer ownership of all sub directories to the new owner
As you can see, you have several options when it comes to permissions. You have the capability to dictate who can do what & the flexibility to limit usability among users. It may be easier to just give all permission to everyone but this may end up biting you in the end, so choose wisely
Permission in numeric mode
The above way of changing permissions will work fine but you may also need to know how to change permissions in numeric mode. chmod is used in much the same way, but instead of r, w, or x you will use numbers instead
What are the numbers?
0 = No Permission
1 = Execute
2 = Write
4 = Read
You basically add up the numbers depending on the level of permission you want to give
0 = —
1 = –x
2 = -w-
3 = -wx
4 = r—
5 = r-x
6 = rw-
7 = rwx
Either variation of changing permissions will work, just remember how to use the numeric values
Tag :
Linux
PORT NUMBERS USED IN ACTIVE DIRECTORY SERVICES
PORT NUMBERS
- 53 TCP Enable DNS TCP 53
- 53 UDP Enable DNS UDP 53
- 88 TCP Enable Kerberos TCP 88 (AD)
- 88 UDP Enable Kerberos UDP 88 (AD)
- 123 UDP Enable NTP UDP 123 (AD)
- 135 TCP Enable RPC TCP 135
- 135 UDP Enable RPC UDP 135
- 137 UDP Enable NetBIOS Name Service
- 138 UDP Enable NetBIOS Datagram Service
- 139 TCP Enable NetBIOS Session Service
- 389 TCP Enable LDAP TCP 389 (AD)
- 389 UDP Enable LDAP UDP 389 (AD)
- 445 TCP Enable SMB over TCP
- 464 TCP Enable K Password TCP 464 (AD)
- 543 TCP Enable K Login TCP 543 (AD)
- 544 TCP Enable K Shell TCP 544 (AD)
- 1025 TCP Enable MSRPC TCP 1025 (AD)
- 1026 TCP Enable 1026 TCP (AD)
- 3268 TCP Enable Global Catalog TCP 3268 (AD)
- 3268 UDP Enable Global Catalog UDP 3268 (AD)
- 53211 TCP Enable AD Replication TCP 53211 (AD)
- 53212 TCP Enable File Replication Service TCP
Thursday, March 1, 2012