Wednesday, November 6, 2013

DD-WRT Port Sniffing

I needed to spy on the network traffic a wireless device was sending through my DD-WRT router, but didn't want to setup a proxy server or a Linux router, or anything really complicated.

What I really wanted was to run wireshark on my DD-WRT router.

Well I got probably the next best thing: the ability to mirror all of the traffic to another PC where I could capture it with wireshark!

Basically it is two commands (one for traffic sourced from the target and one destined for the target):


iptables -t mangle -A POSTROUTING \
    -d [IP to spy on] \
    -j ROUTE –tee –gw [IP of wireshark]
iptables -t mangle -A PREROUTING \
    -s [IP to spy on] \
    -j ROUTE –tee –gw [IP of wireshark]

Check out this link for the source:
http://thatexplainsalot.com/blog/2010/11/use-wireshark-and-dd-wrt-router-firmware-to-imitate-port-monitoring-on-a-router-switch-port/

Tuesday, March 5, 2013

Compress THIS!

Occasionally I like to free up hard drive space and who better to help than Windows itself? That's why I use the Disk Cleanup tool.

Unfortunately, one of the ways that the Disk Cleanup tool likes to "free up space" is to compress all of your "old" files. This, of course, is a terrible idea.

Fortunately there's a way to disable it!

Simply delete:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Compress old files

Monday, April 9, 2012

RFC 2889

RFC 2889: LAN Switch Benchmarking Methodology

I was just discussing this today at work -- and I'll be spending some time going through this in the next few days.

Project Management & Repository

It's been _forever_ since I've posted on here -- so I'll start out with something quick and easy -- and at the same time, something that's changed my life for the better.

I manage a few projects at work -- most of which need the assistance of a project manager. The one that I've become accustomed to using has all of the features that I have come to rely on and appreciate. One word: Unfuddle.

Here's to posting more regularly!

Tuesday, January 31, 2012

ASN.1 Decoding Made Easy

Next time you need to ASN.1 decode something real quick, take a look at this ASN.1 JavaScript decoder

Simply fantastic.

Thursday, January 19, 2012

Building OpenSSL with FIPS

When trying to build openssl-fips-1.2.3, I can never remember how to build the fips canister first:

./config fipscanisterbuild
./make
./config
./make

Thursday, December 15, 2011

ATI Video Drivers for Radeon Mobility X1400

I recently re-purposed my old 17" laptop (read: desktop replacement) by Velcroing it to the underside of the kitchen cabinets. When I did this, the laptop screen had to open down instead of up -- meaning that the screen was now upside-down. Piece of cake to fix, just select the "rotate screen 180*" button in the ATI software, right? Negative.

It turns out that Windows XP Service Pack 3 broke the ATI software. Because I wasn't using this feature at the time, I missed out on all of this drama -- as well as the opportunity to download the updated device drivers. Now the device drivers (if they ever did exist) are buried in some archive that I can't get to or find after hours of Googling. I could find many drivers for the ATI cards, and even the ATI Radeon Mobility cards, and even the ATI Radeon Mobility X(number) cards -- but not the X1400.

I think this is because Dell and Lenovo (and probably other OEMs) packaged this card with their PCs and didn't want people downloading device drivers from ATI that would cause problems because they would have to field the tech support calls. Which is what this ATI site confirms.

Anyway, I searched and searched and couldn't find any drivers, until I found this:
http://www.hardwareheaven.com/modtool.php

That's right, someone actually wrote a tool to modify the ATI drivers so they would work with other cards. Now I can download the drivers meant for the 22 other models and they will work with my card, which is conveniently left out of the list.

And it works! I now have a laptop working with an upside-down screen!

Posting Code Snippets on Blogger

As you can see by my previous post, I figured out how to post code snippets on Blogger.com.

Thanks to this site: http://alexgorbatchev.com/SyntaxHighlighter

and to Google Sites for hosting the files: http://sites.google.com

Resynchronizing Windows Update

I had a problem with Windows Update not synchronizing correctly and leaving all of my WSUS managed clients sitting at 99% all of the time. I found this handy .vbs script to get me out of the jam:

Set fso = CreateObject("Scripting.FileSystemObject")
Set objAutomaticUpdates = CreateObject("Microsoft.Update.AutoUpdate")
objAutomaticUpdates.EnableService
objAutomaticUpdates.DetectNow

Set objSession = CreateObject("Microsoft.Update.Session")
Set objSearcher = objSession.CreateUpdateSearcher()
Set objResults = objSearcher.Search("IsInstalled=0 and Type='Software'")
Set colUpdates = objResults.Updates

Set objUpdatesToDownload = CreateObject("Microsoft.Update.UpdateColl")
intUpdateCount = 0
For i = 0 to colUpdates.Count - 1
intUpdateCount = intUpdateCount + 1
Set objUpdate = colUpdates.Item(i)
objUpdatesToDownload.Add(objUpdate)
Next

If intUpdateCount = 0 Then
WScript.Quit
Else
Set objDownloader = objSession.CreateUpdateDownloader()
objDownloader.Updates = objUpdatesToDownload
objDownloader.Download()

Set objInstaller = objSession.CreateUpdateInstaller()
objInstaller.Updates = objUpdatesToDownload
Set installationResult = objInstaller.Install()

Set objSysInfo = CreateObject("Microsoft.Update.SystemInfo")
If objSysInfo.RebootRequired Then
Set objWMIService = GetObject _
("winmgmts:{impersonationLevel=impersonate(Shutdown)}!\\localhost\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
objOperatingSystem.Reboot()
Next
End If
End If

Thursday, October 13, 2011

Windows Update Service Missing

Fix: Download the Windows Update Agent and force it to install.

Step 1. Download the Windows Update Agent:
WindowsUpdateAgent30-x86.exe
WindowsUpdateAgent30-x64.exe

Microsoft KB 949104


Step 2. Force the installation
If installing the agent fails because it is already installed, you can force the install:

WindowsUpdateAgnet30-(x86/x64).exe /wuforce


Finally, you probably want to run a spyware scan (eg. Spybot Search & Destroy or Malwarebytes) because chances are pretty good you've got something. I routinely disable System Restore in these scenarios because that garbage likes to hide in there.

Thursday, February 4, 2010

Mount LVM in Ubuntu

I just migrated from RedHat to Ubuntu on a server at my office.

We had Logical Volumes on the RedHat server, and we need the data off of that drive.
mount: unknown filesystem type 'LVM2_member'

Thank goodness somebody smarter than me had run into this before. Here's how you mount a LVM in Ubuntu:


Note: I did not have to `modprobe dm-mod`.

Wednesday, November 25, 2009

Common Wireless Internet Problems

Here's the situation: your PC reports "Excellent" signal strength to the wireless router, but your PC is unable to connect to the internet.

As usual, to better understand the possible solutions, we must first address the possible problems.

Some background information:

There are actually 3 connections in this scenario:
  1. From the PC to the wireless router
  2. From the wireless router to the modem (cable or DSL)*
  3. From the modem to the internet

* In some cases, the wireless router and the modem have been "combined" and placed in the same box. In this case, you can just assume that the connection between these two is made and has no problems. If the problem is here, you're in trouble!

When the PC reports "Excellent" signal strength, it is simply referring to connection #1. If you just plugged the wireless router into power, and nothing else, and turned your computer on, it would report "Excellent" signal strength. The PC simply assumes (and we know what that makes it) that if it can connect to the wireless router, then it can connect to the internet. But wait, it is assuming that there are two more connections present and working!

Usually, in this situation, the problem is simply the wireless router and the modem are out of sync. Here's why:

Situation #1:

Every computer in the world on the internet has to have an IP address. It's like a house address for mail delivery. If you don't have an address, you can't get on the internet.* (* This isn't 100% true, but for the purposes of this article, it is.)

The wireless router is in charge of getting the address from your Internet Service Provider (ISP). Well, we could quickly run out of addresses if we just handed them out and they had to be valid forever, so we give them a "lifetime". Usually this is about 1 day. So, every 1 day, the wireless router will talk to the ISP and say, "Hey, my IP address expired. Can I have another one?" At this point, the ISP will say, "Sure, here it is."

Now, to keep things "simple", the ISP will normally give you the same address over and over and over. BUT, if they did that, you could take advantage of that and setup servers and do other things that the ISP doesn't really want you to do because it uses the connection pretty heavily.

This is precisely where the problem comes in. Somehow the wireless router gets out of sync with the ISP. At this point, the wireless router continues to try to use the old IP address and the ISP won't accept it because it just handed out the new IP address and expired the old IP address.

So, your PC is connected to the wireless router with "Excellent" signal strength; the wireless router is connected to the modem; and the modem is connected to the internet -- but the last two connections aren't valid because the wireless router and the ISP are out of sync.

Solution:

  1. Unplug the wireless router from the power.
  2. Unplug the modem from the power.
  3. Count to 30 (60 if you have the time and patience).
  4. Plug the modem back into the power.
  5. Count to 30 (60 if you have the time and patience).
  6. Plug in the wireless router into the power.
  7. Wait for your PC to reconnect to the wireless router.

** Also see "Notes for Steps 4 & 5" below!

Situation #2:

Your computer is reporting "limited or no connectivity".

Your computer was unable to get an IP address from the wireless router. (It probably has an AutoIP address of 169.254.xxx.yyy which isn't much good in our situation.)

Possible Problems:

  1. The "key" that was entered to connect to the wireless router was input incorrectly.
  2. The wireless router has "MAC address filtering" enabled, and your computer isn't on the approved list.
  3. The wireless router is out of IP addresses to give out (this isn't very likely).

Again, let's try to understand the process a bit better. When a PC connects to a wireless router, it goes through a few steps:

  1. The PC "associates" with the wireless address. This is basically when the PC says "Okay, wireless router, I'm choosing you to connect to, so when I say things, you need to pay attention!"
  2. Once this "association" takes place, the PC then tells you that the connection has been made and the signal strength as "Excellent".
  3. It then does all the crazy encryption and "key" stuff to encrypt the connection.
  4. *It then asks the wireless router for an IP address.
  5. *If it cannot get an address, it will notify you that the connection has "limited or no connectivity."

Notes for Steps 4 & 5:

Very seldom you will come across a situation where the IP address has been set manually on your computer. This means that every time your computer connects to the wireless router, it will use the same IP address. This is a bit more technical and requires a small bit of technical know-how, but it's do-able. IF THIS IS THE CASE: then it will skip steps 4 & 5 and just try to use that IP address. If that IP address isn't one of the IP addresses that the wireless router can communicate with, then the PC and the wireless router simply just won't be able to talk to each other. At this point, the computer will not list the connection as having "limited or no connectivity", it simply won't work.

Saturday, November 21, 2009

Moving from headless to modded-NAS

So, in an attempt to de-clutter my office area with my webserver, I did some digging.

Seems like most of the older Western Digital MyBook World Editions come preloaded within linux, and have a pretty hefty following for modding the flash to support various features.

I dig it.

And by the way, did I mention that it comes with a gig-ethernet port, and USB port? We'll get to why both are handy in a sec...

So, I purchased a 500GB one, pretty cheap actually. Just do some checking around on Google -- the one I found was refurbished, and ran about 80$.

A good go-to guide.

Looks like it could solve my issue of having a stranded USB printer in my closet upstairs. Assuming this doesn't put out too much heat, I can put it up in my pretty-airy closet upstairs next to the printer, and then use a modded WRT54G to connect it down to my wireless router downstairs.

Spiffy!

Tuesday, November 3, 2009

Active Desktop of Slowness...or NOT!

I have always LOATHED Active Desktop in Windows. It always made the PCs so SLOOOOW!

But, I found another use for it today, and I have to say, I'm very impressed.

Check this out!

Tuesday, October 20, 2009

My G1!!! (Updated January 3, 2010)

So, as you probably have guessed, I got myself G1.

It has surpassed my dreams and I could probably go on about it's awesomeness for the rest of this post, but enough drooling -- down to business.

My favorite apps (alphabetical order):


Babbler ($1.49): Facebook app that beats the "real" Facebook app.

Babbler Lite: Free version of Babbler.

Barcode Scanner: Scans regular and 2D barcodes, like the QR codes you see to the left.

Bloo ($0.99): Facebook. Better then Babbler after the last Babbler update (they made it green and very slow).

Bloo 1.4 Beta: A free version of Bloo. I haven't tried it yet, but I'm going to.

Bubble: A level (just really cool).
DailyStrip: Comic strip viewer.

FlashLight: It took me a while to find a good flashlight app.

Google Goggles: Just awesome.
Google Maps: Because it has Latitude.

Google Sky Map: I love the stars, this gives me a real-time view of the stars. I can hold it up to the sky in front of me to see where things are.

Key Ring: Stores all of my key-chain cards (Dillons, Kroger, Dick's Sporting Goods, etc.) so the store just has to scan my phone. Haven't used it yet, but I'm anxious.

Listen: A Google podcast manager with pause/resume capabilities.

Locale: Really cool app. I don't use it, but it makes the list.

Movies: A fantastic app that lets you look up movies, see information, watch trailers, find showtimes (for theaters around your location) and even manage your Netflix queue.

Note Everything: A nice notepad which includes the ability to draw pictures.

Shazam: I've been a fan for a long time, now I have it!

ShopSavvy: Another barcode reader, but with many more features dealing with finding the best price(s) both online and locally as well as reviews.

Silent Time: I originally used Locale but it turned out to be overkill since I just wanted my phone to automatically turn off my ringer when I went to sleep and turned it back on when I woke up.

SnapPhoto: A replacement for the default camera app that includes stability and some effects.

SnapPhoto Pro ($0.99): Paid version. This is my next purchase.

TaskPanel: A great task manager with auto-kill and ignore lists.

Toggle Settings: This is a nice app. It has replaced Silent Time and given me a bit more control.

Weatherbug: I have always hated WeatherBug with a passion because the version for regular computers is full of spyware and junk software that slows your computer down. This version is the complete opposite; it is a fantastic app.

WeatherBug Elite ($1.99): Paid version with no ads and animated RADAR. I bought this.


Anybody else have any good ones?

Thursday, September 24, 2009

A Visualization Study for MANET Performance Metrics

I thought I'd post my presentation(s) from my summer internship over here; It was a really cool summer at MIT Lincoln Laboratories. And since my work was all unclassified... Have fun checkin' it out!

C Lydick. "A Visualization Study for MANET Performance Metrics."

Basically: I ended up taking the PCAP and GPS data from one of the Dartmouth Experiments on Crawdad and extracted the metrics in an attempt to find underlying multivariate relationships between network metrics. I think we did. :-)

Let me know if you've got questions/comments. I may end up posting the memo that accompanies this presentation -- we'll have to see.

Thursday, September 10, 2009

Roadtrip & Latitude Part 2!

OK, since it was such a success... and really helpful for those who were curious about where I was...

I'll post this again.





BTW... The icon looks funny. I'm going to see if I can adjust that...

Tuesday, August 11, 2009

I just cleared my cookies...oh, wait...I missed some!

I'm not one of those uber-paranoid people that wipes out my cookies each time I close my browser. Quite frankly, I just don't care that much.

But little did I know, that little "Clear Cookies" button can miss a few here and there.

According to this article it is possible for websites to use Flash-based cookies to track you, and they aren't cleared out with the normal button.

You actually need a Firefox Add-on like BetterPrivacy, or even an extra application like CClearner.


Yet another bit of proof that the best way to ensure security is to not rely on the "comfort" of the Erase button.

Tuesday, August 4, 2009

Oops...I forgot how to Administer

Forgotten administrator passwords can be a pain -- especially in Windows.

Here's one method for resetting it if you've forgotten it.

Monday, August 3, 2009

Remove Unhelpful Help

I hate that stupid "Help & Support" option on the Start Menu.


  • Click Start->Run and type 'Regedit.exe'

  • Navigate to the following location:

    HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ Advanced


  • In the right-pane, create a new REG_DWORD value named 'NoStartMenuHelp'

  • Double-click 'NoStartMenuHelp' and set it's value to '1'

  • Close Regedit.


Thanks winxptutor.com for the help!