D-link router_info.xml (and other interesting things)

It occurred to me that if D-Link has a desktop gadget that can poll bandwidth statistics from my router (DIR-628) then I should be able to do the same!

Turns out the router has a web service of sorts at http://<router ip>/router_info.xml?section=<section name>

where section is one of:
system_info
filter_config
wan_stats
lan_stats
wlan_stats
scheduler
dhcp_server
virtual_server
application_rule
port_forwarding
rip_config
time
misc_config
ddns
dmz
system_log
qos
wps

(Note: I found these by digging through the firmware)

Perfect! If you poll this service, you get stats (and much more) all packaged up in XML. There is something potentially troubling, though. The ddns and wlan_stats sections provide cleartext passwords, even if you are logged in with normal user credentials. In other words, all a person would need in order to get the wireless password is about 10 seconds plugged in to an ethernet port.

This isn’t the only little bit of undocumented goodness though. Here are a bunch of undocumented urls that provide info of various sorts:

/setconfig.cgi
/plt_command.cgi
/wifi_assoc.xml
/wlan_radio_status.xml
/save_log_data.cgi
/redirect.cgi
/wait.cgi
/active_sessions.xml
/computer_list.xml
/wlan_stats_get.cgi
/wlan_stats_reset.cgi
/get_pcmac.cgi
/get_pcip.cgi
/reboot.cgi
/dhcp_clients.xml
/mac_filter.xml
/log.cgi
/get_time.cgi
/wan_lan_status.xml
/wan_connection_status.xml
/internet_service_provider_list.xml
/login_salt.cgi
/post_login.xml
/get_auth_id.cgi
/wan_dhcp.cgi
/wan_pppoe.cgi
/wan_mpppoe.cgi
/wan_pptp.cgi
/wan_l2tp.cgi
/get_uptime.cgi
/ssi_ping_test.xml
/ssi_dns_resolve.xml
/log_cmd.xml
/interface_stats.xml
/interface_stats_cls.xml
/dhcp_lease_revoke.cgi
/widget_wan_stats.xml
/widget_wan_get_settings.xml
/interface_option_list.cgi
/routing_table_ssi.xml
/cgi_ssi_igmp_group_memberships.xml
/get_reboot_timeout.cgi
/regdump.cgi
/get_current_wlan_channel.xml
/get_wifisc_pin.cgi
/wifisc_add_sta.xml
/wifisc_ap_get_wpa_settings.xml
/wifisc_ap_save_wpa_settings.xml
/wifisc_add_sta_progress.xml
/wifisc_cancel_add_sta.xml
/check_admin.cgi
/get_admin_pwd.cgi
/check_admin_password_changed.cgi
/wifi_log.xml
/logout.cgi
/logged_in.cgi
/lltd_bw_start.xml
/lltd_bw_stop.xml
/lltd_bw_result.xml
/chklst.txt
/version.txt
/get_ddns_status.xml
/get_usb3g_status.xml
/usb3g_connect.cgi
/reset_unconfiged.cgi
/get_auto_wepkey.xml
/get_router_timer.xml
/dfw_query.xml
/dlink_query.xml
/dlink_query_fw.xml
/getconfig.cgi
/router_info.xml

Some of them would appear to provide data for the router interface’s ajax – I would assume all the information is also avilable via the interface. It’s just nice to have access to XML.

Have fun!

2 thoughts on “D-link router_info.xml (and other interesting things)

Leave a Reply

Your email address will not be published. Required fields are marked *