Showing posts with label Router. Show all posts
Showing posts with label Router. Show all posts

Tuesday, March 4, 2014

Security: Linux, Viruses, Malware, and Worms

Abstract:
Not long after the advent of The Internet, the creation of worms, viruses, and other malware had become prevalent. Microsoft based platforms were the original serious target, because of poor security measures. Over time, malware had started to attack Linux based Android mobile phones. Now, the latest attacks appear to be hitting Linux based consumer grade internet routers, which were originally used to help protect Microsoft Windows based platforms in the home. These attacks have spiked in the first two months of 2014.


[Huawei TP-Link image, courtesy rootatnasro]
2013-01-11 - How I saved your a** from the ZynOS (rom-0) attack!! (Full disclosure)
Hello everyone, I just wanted to discuss some vulnerability I found and exploited for GOODNESS .. just so that SCRIPT KIDIES won’t attack your home/business network .
Well, in Algeria the main ISP ( Algerie Telecom ) provide you with a router when you pay for an internet plan. So you can conclude that every subscriber is using that router . TD-W8951ND is one of them, I did some ip scanning and I found that every router is using ZYXEL embedded firmware.


[Linksys Router, courtesy ARS Technica]
2014-02-14 - Bizarre attack infects Linksys routers with self-replicating malware
Linksys is aware of the malware called “The Moon” that has affected select older Linksys E-Series routers and select older Wireless-N access points and routers. The exploit to bypass the admin authentication used by the worm only works when the Remote Management Access feature is enabled. Linksys ships these products with the Remote Management Access feature turned off by default. Customers who have not enabled the Remote Management Access feature are not susceptible to this specific malware. Customers who have enabled the Remote Management Access feature can prevent further vulnerability to their network, by disabling the Remote Management Access feature and rebooting their router to remove the installed malware. Linksys will be working on the affected products with a firmware fix that is planned to be posted on our website in the coming weeks.


[ASUS Warning, courtesy ARS Technica]
2014-02-17 - Dear Asus router user: You’ve been pwned, thanks to easily exploited flaw
"This is an automated message being sent out to everyone effected [sic]," the message, uploaded to his device without any login credentials, read. "Your Asus router (and your documents) can be accessed by anyone in the world with an Internet connection. You need to protect yourself and learn more by reading the following news article: http://nullfluid.com/asusgate.txt."
...
Two weeks ago, a group posted almost 13,000 IP addresses its members said hosted similarly vulnerable Asus routers.


Conclusions:
If you are doing any serious internet based work, one might suggest that care is taken to watch the firmware of your consumer grade internet router, and upgrade the firmware as they become available. If you are running a business, a commercial grade router with a managed service may be of special interest. A short PDF on "SOHO Pharming" helps clarify risks. The avoidance of Linux based Android phones or consumer grade Linux routers may be the next best step.

Friday, April 30, 2010

Enabling SNMP Community Strings on a Cisco Router (and Other IOS Devices)

Abstract: We're enabling SNMP community strings (SNMP's concept of a password) on a Cisco router named 'C2600' running Cisco's IOS (Internetwork Operating System). The router has never previously been configured for SNMP.



WARNING: SNMP in IOS versions 11.x-12.0 had a security vulnerability. More here.


Notes: IOS is also used in other Cisco managed network equipment and the generic term 'device' will be used onward in reference to the router.
Full IOS commands are used but many can be shortened: 'configure terminal' to 'conf term'; 'show' to 'sh'. Pressing *Tab* autocompletes a command if the letter combination is unique. Entering 're' *Tab* will fail as it could be for 'reload', 'rename','restart', or 'resume'. Entering 'ren' *Tab* will complete to 'rename'. If you forget a command, the '?' *Enter* will display most of the commands.



C2600> enable

Enable mode is used to view a device's settings.



C2600# show running-config

If SNMP is mentioned it was previously configured.


C2600# configure terminal

Configure allows you to change the device's settings.



C2600(config)# snmp-server community 'public-string' RO

'RO' stands for 'Read-Only' meaning that someone who knows the device's public string can view the device's SNMP settings. A relatively harmless ability.



C2600(config)# snmp-server community 'private-string' RW (RW read-write)

RW stands for Read-Write meaning that someone who knows the private string can change the device's settings. Someone with this knowledge can ruin your plans for the day, especially if the device is thousands of miles away. An instance: here's instructions for "How To Copy Configurations To and From Cisco Devices Using SNMP"



Replace 'public-string' and 'private-string' with appropriate substitutions. The common default strings are 'public' & 'private'. These strings are not recommended for securing the device.



C2600(config)# exit

Exits configure mode back to enable mode.



C2600# show running-config

A few lines about SNMP should appear.



C2600# write memory

This writes the new settings to memory. If you skip this step, you'll need to start over.



To check that configuration was successful:

C2600# show snmp

Empty stats about usage will display if SNMP is correctly configured.

Sunday, April 25, 2010

Basic Cisco Router Security and Ethernet Support


Abstract: We're going to quickly configure and secure a stock Cisco 2505 router and enable ethernet support. The tasks that follow:

1) shutdown unnecessary serial ports
2) set passwords
3) change the IP address

The router will start in user (boot) mode. In this mode we can see configuration data but not make alterations. The example router is named Bart and this is the current prompt:

Bart>

Moving into privileged (aka enable) mode allows the admin to make changes. The system indicates privileged mode with # for the prompt:

Bart> enable
Bart#

Closing Unnecessary Serial Ports

The router's serial ports will not be used for this network and both must be turned off. On the prompts, notice that (config) is general configuration mode and (config-if) indicates that a particular 'interface' (serial, ethernet, etc. port) has been selected.

Bart# configure terminal
Bart(config)# interface Serial0
Bart(config-if)# shutdown
(to reenable the command is no shutdown)
Bart(config-if)# exit
(repeat for Serial1)
Bart# write terminal
At this point the configuration information is printed to the screen. Check to ensure the data is properly entered.
Bart# write memory

Enabling and Encrypting Passwords

We'll start with securing the console (initial screen).

Bart# config term
Bart(config)# line console 0
Bart(config-line)# login
Bart(config-line)# password Sk@teb0ard
Bart(config-line)# exit

Remote terminal sessions:

Bart# config term
Bart(config)# line vty 0 4
Bart(config-line)# login
Bart(config-line)# password Krus%Ycl0wn
Bart(config-line)# exit

Privileged mode:

Bart# config term
Bart(config)# enable password Tr<>4ouSe
Bart(config)# exit
Bart# disable (exits privileged mode into user mode)
Bart> enable
Password:


Viewing the system configuration at this point reveals the passwords in plain text. To ensure no one accidentally views sensitive info, it must be encrypted.

Bart# config term
Bart(config)# service password-encryption
Bart(config)# exit
Bart# write terminal (check that all passwords are encrypted)
Telnet into the router to ensure your password works. All changes have been tested.
Bart# write memory (saves the configuration information to NVRAM and will persist through power cycles)
Bart# reload (restarts the router)

System configuration was modified. Save? [yes/no] yes
Proceed with reload? [confirm] *press enter*

Close the terminal window so that someone can't scroll up and collect password data that was previously displayed.

Changing the IP Address

Bart> enable
Bart# conf term
Bart(config)# interface Ethernet0
Bart(config-if)# ip address 192.168.9.1 255.255.255.255
Bart(config-if)# exit
Bart(config)# exit
Bart# write term (check that change was made)
Bart# write mem