copy-router-config
Copies configuration files from Cisco devices running SNMP to a TFTP server. Companion tool merges configs from TFTP server back to the router.
Description
copy-router-config is a Perl script designed to extract configuration files from Cisco routers and switches via SNMP. It requires a TFTP server to receive the copied configs, preferably running from /tmp. The tool authenticates using SNMP community strings and targets devices like routers at IP addresses such as 192.168.1.1.
A related script, merge-router-config, reverses the process by uploading configs from the TFTP server back to the Cisco device. This is useful for backing up, modifying, and restoring router configurations in network penetration testing or administrative tasks.
These tools are part of Kali Linux's suite for network device manipulation, relying on SNMP vulnerabilities or misconfigurations for access. They are lightweight, with an installed size of 12 KB, and depend on perl-cisco-copyconfig.
How It Works
The tools use SNMP to issue configuration copy commands to Cisco devices. copy-router-config.pl instructs the router to transfer its running or startup config to the specified TFTP server IP. merge-router-config.pl does the opposite, merging a config file from the TFTP server into the router. Authentication relies on the provided SNMP community string (e.g., 'private'). A TFTP server must be operational on the target port, ideally in /tmp for easy setup.
Installation
sudo apt install copy-router-configExamples
copy-router-config.pl 192.168.1.1 192.168.1.15 privatemerge-router-config.pl 192.168.1.1 192.168.1.15 privatecopy-router-config.pl -hmerge-router-config.pl -h./copy-router-config.pl <router-ip> <tftp-serverip> <community>./merge-router-config.pl <router-ip> <tftp-serverip> <community>