OHMS BLOG

Showing posts with label technology. Show all posts

Sunday, June 17, 2012

technology

How to switch a Cisco DPC3825 / EPC3825 to/from bridge mode at will

DISCLAIMER: This blog entry is unsupported. It outlines the steps that I successfully taken to switch this device into bridge mode. I am posting this as a courtesy to people who would like to know how to do the same. Having said that, my work here is done and my problem has been solved. This technique might not work for all firmwares. It requires knowledge of HTML and HTTP. If this isn't working for you, please do not post comments or send me emails asking me to solve your problem for you.

A few weeks ago I had to help somebody deal with an annoyance: They had a Cisco DPC3825 device that is a combination cable modem + wireless router device. They were unhappy with the device's router functionality and wanted to set it to "bridge mode," i.e. disable everything but the cable modem.

This is easier said than done; this device had its firmware customized such that no user interface was available to change such things. There were no form fields present pertaining to the device's mode. I found some limited information on other websites. Many of these users had devices with firmwares that were different from the one that I was working with. In their cases, the form fields for switching modes were present in the HTML but hidden via CSS.

On the forum website, their solution was to remove the display: none from the field's CSS, making the form field visible. I was disappointed with this solution, as it wouldn't work in my case. On the other hand, I couldn't help but notice that the forum users had posted a few images of their HTML. Indeed, one of the screenshots includes the necessary <select> tag, whose name was "working_mode"! We weren't finished yet, however: I still needed to figure out which value to use for the hidden field. I noticed that in other <select> inputs, the firmware set the field's value to the 0-based index of the option in the select. The screenshot showed that "Router Mode" was the first option, implying a value of "0", followed by "Bridged Only," implying a value of "1". This means that one can, as part of the administration form, just insert an additional field. I'm lazy and I only needed to execute the command once, so I just used Firebug to inject a hidden input into the administration form. Look for the

<form name="administration" method="POST" action="/goform/Administration">

tag and add the following:

<input name="working_mode" type="hidden" value="1">

I submitted the form and was then presented with a screen informing me that the device was rebooting. When it reboots in bridge mode, the device resets its IP address to 192.168.100.1. To switch back to router mode, do the same thing but set the input value to "0".



Of course you might want to script all of this and POST the form directly.

Wednesday, March 14, 2012

technology

How do I reference TrustedInstaller?

I was editing some ACLs on my Windows box the other day, and I wanted to assign ownership of a directory to TrustedInstaller. The trouble was that I couldn't figure out how to specify the TrustedInstaller user into the security editor. After scouring several blog posts I finally found the answer. Here it is for posterity:

NT SERVICE\TrustedInstaller

Wednesday, May 25, 2011

privacy technology

Your unencrypted network traffic is vulnerable beyond the Wi-fi access point

Whether it's your Facebook identity or your Google Calendar traffic, there has been plenty of coverage lately about unencrypted information being sent to websites. What annoys the hell out of me, however, is this notion (coming from people who should know better, might I add) that these issues are only a problem if you're connecting to the internet via unsecured wi-fi.

This is complete and utter nonsense; the only thing that secured wi-fi gives you is a higher barrier to entry!

Consider this mental exercise: What happens to your data after it travels past the wi-fi access point? It needs to travel the remaining hundreds or thousands of kilometres to the website's data centre. If that information is unencrypted at the application layer (let's say via HTTP), it's just as visible by somebody intercepting it as it comes across the wire as it was over the unsecured airwaves. Wi-fi encryption is at the link layer, so it's only going to protect your data as it travels from your device to the access point; from then on, it's open season.

I don't dispute the fact that it's easier to snoop on unsecured wi-fi than it is to monitor a wired medium. What I do dispute is this ridiculous claim that securing your wireless connection or using a wired connection solves everything for you.

Avoiding unsecured wi-fi is not the solution. Using secure application layer protocols such as HTTPS is the solution.

Friday, April 17, 2009

technology

VMware Remote Console Installation Woes

I installed VMware Server 2.0.1 on an Ubuntu Linux box yesterday. Unfortunately I couldn't get the remote console plug-in to install in my Firefox 3.0.8 browser. Firefox would prompt me to install the extension, but time after time the extension install and subsequent browser restart would not work. The extension showed up in the Add-ons dialog box, but the VMware infrastructure web access page was unable to successfully load it. I'd keep getting the message, "The VMware Remote Console Plug-in is not installed or could not be found."

That's when I noticed that my browser was trying to load the Win32 build of the extension. I smacked myself in the forehead. "Of course!" I thought, "it thinks I'm running under Windows because of my browser configuration!"

For Firefox installations on my Linux boxes, I specify the general.useragent.override configuration setting. The reason that I do this is because some websites only want to support Windows. They check the browser's user agent and do funny things if the browser says something other than Windows. I know that I'm not going to call their technical support department to report that "my series of tubes on teh internets isn't working," so I override the default setting with a perfectly valid user agent from a Windows version of Firefox.

While spoofing the user agent fixed those annoyances, it unfortunately was also fooling VMware. I temporarily restored the default user agent and was then successfully able to install the extension for the correct platform. In the end all of this grief was just another one of those self-inflicted, non-obvious boundary cases.

Sunday, December 21, 2008

privacy technology

Hijacked search results

Earlier this week I noticed that Google searches on my Windows XP box were coming up with bizarre results. I'd type something in to Google and my search results would come up with headings and descriptions that looked correct but linked to bogus sites. At first I thought that this was some kind of search engine optimization gone awry. Two things changed my mind:

  1. I noticed my web browser accessing a bogus URL: http://1.2.3.0
  2. I checked my other machines (all running Linux) and they all worked correctly.
I viewed the source of the Google results, and I noticed an HTML script tag that had been injected into the search results page. I installed the NoScript Firefox extension which was successfully able to disable this foreign script and fix my Google results. Now I could work on actually eliminating this malware.

I opened up a Cygwin bash prompt and tried to ping 1.2.3.0, thinking that perhaps this was redirecting elsewhere - nothing turned up. On the other hand, if I launched Firefox and typed in that URL, it would connect to a server and retrieve some JavaScript. At this point I was convinced that this redirection was localized to my Firefox process.

I decided that whatever was causing this could have a varying degree of sophistication. Going for the low-hanging fruit seemed to be the most obvious course of action. I fired up Process Monitor from Sysinternals and logged everything that happened in the system as I entered "http://1.2.3.0" in the Firefox address bar. Here's what I found:



Notice the TCP transmissions to 94.247.2.58 port 80 (HTTP). Something is definitely phoning home. A quick run of the ping command with reverse DNS lookup gave me a successful hit of hs.2-58.zlkon.lv.

Rather than continuing with a fine-grained investigation, it was time to let my fingers do the walking. I had already disabled (though not yet eradicated) this malware, and at this point I had something to search on. Google promptly returned these juicy nuggets:

Beware of sysaudio.sys!

Fake sysaudio.sys causes search engine hijack

It looks like whatever put this on my machine was using some kind of unpatched browser exploit. Anyway, those blog posts point out that c:\windows\system32\sysaudio.sys is the likely culprit. Sure enough, I found it on my machine.

I decided to take a look to see if I could obtain some more information from this binary without doing any disassembly. I ran the strings command and got some interesting results. I won't include them all here, but I will note that they were all reversed in the binary. For example, one line in the strings output was:

:tnegA-resU

Look familiar? Reverse the string and think HTTP. ;)

Among other things, there are HTML script tags embedded in the binary, as well as parts of a URL that look like they are eventually spliced together. There's also a line containing the string "ntnet.drv", so that looks like another file that might be involved.

Here's the MD5 checksum for sysaudio.sys: db8c035980bf8cd18953e3f3f0abfe7e

By quarantining the files and fixing the registry key as mentioned in those blog references, it appears that this piece of malware has been eliminated. Despite the fact that I was happy (and intrigued) to track this issue down, I am kicking myself in the ass for allowing this to happen in the first place. On Windows I tend to run as an Administrator because of so many shitbox apps out there that can't handle a low-privileged user. I usually use Michael Howard's DropMyRights utility to ensure that stuff like this can't happen. I don't know why I wasn't using it on Firefox... perhaps my modified shortcut got overwritten during an upgrade?

UPDATE January 9, 2009: I submitted this malware sample to a number of anti-virus vendors, and some of them needed to add it to their databases. It appears that a slightly different version has been floating around as of late, this time under the guise of c:\windows\system32\wdmaud.sys and accessing http://7.7.7.0 instead of http://1.2.3.0.

Release 7.0; Copyright © 1996-2012 Aaron Klotz. All Rights Reserved.