The fusion of technology, business, and life

Archive for January, 2009

Changing Remote Desktop Listening Port for Vista or XP

Remote desktop (RDP) is a great way to remotely access Windows-based desktops and servers. Although security through obscurity is not a reliable method of securing anything, changing a service's listening port can be an effective way to reduce random break-in attempts from botnets. This method will work for Windows XP or Vista.

The standard port for RDP is 3389, and you can determine an unused port by checking this list of common port numbers. I would recommend using an unused port higher than 1024. You can change the RDP port by following these steps:

  • Enter the Windows' registry by clicking on the Start Menu, Run, and typing: regedit.exe
  • Locate and then click the following registry subkey:
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber
  • On the Edit menu, click Modify, and then click Decimal
  • Type the new port number and click OK, then close the registry editor.

For more information, see Microsoft's Knowledge Base article about changing the remote desktop listening port.

No comments

PDF Print Security and Xpdf

The security model for PDF files is inherently insecure, because it relies on the viewer/reader software to respect the security features specified by the PDF standard. Since there are open source PDF viewers, like Xpdf, it is trivial to modify a PDF viewer to ignore the PDF standard's security model and allow printing, modifying, copying of "protected" PDF files.

After downloading the Xpdf source code, simply edit the XRef.cc file to ignore the security checks, and then recompile. Here is the section of code you would need to modify:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
GBool XRef::okToPrint(GBool ignoreOwnerPW) {
  return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permPrint);
}
 
GBool XRef::okToChange(GBool ignoreOwnerPW) {
  return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permChange);
}
 
GBool XRef::okToCopy(GBool ignoreOwnerPW) {
  return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permCopy);
}
 
GBool XRef::okToAddNotes(GBool ignoreOwnerPW) {
  return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permNotes);
}
</code>
 
Modify it as follows:
<code>
GBool XRef::okToPrint(GBool ignoreOwnerPW) {
  return (1);
}
 
GBool XRef::okToChange(GBool ignoreOwnerPW) {
  return (1);
}
 
GBool XRef::okToCopy(GBool ignoreOwnerPW) {
  return (1);
}
 
GBool XRef::okToAddNotes(GBool ignoreOwnerPW) {
  return (1);
}

Then compile Xpdf by running ./configure and ./make.

If you run into problems with dependencies when compiling Xpdf and are using Debian or Ubuntu, just run apt-get install xpdf ghostscript so it can handle getting all the dependencies.

At this point, you can either open the PDF using Xpdf and print it, or if you want to permanently convert it to an unprotected PDF, run:

pdftops file.pdf file.ps
ps2pdf file.ps unprotected.pdf
No comments

Discovering a Device's Unknown IP with Wireshark

I ran into an interesting situation recently — I had a Compaq BL10e blade server enclosure that was powered on and connected to the network, but no one knew the IP address for the enclosure's management interface. The enclosure also had a serial console option, but either the manual wasn't helpful enough in figuring out the correct connection settings, or it had been disabled/broken previously. To find the IP address for the enclosure, I made a cross-over ethernet cable and connected one of the blade server's ethernet ports to the enclosure's management ethernet port.

Wireshark is a network protocol analyzer, which allows you to view/capture network traffic. I setup Wireshark on the blade server (on a debian server, just apt-get install wireshark), specified the interface I wanted to watch, and watched the packets from the enclosure's management interface show up in Wireshark. Since Wireshark displays the IP address for the network traffic it captures, I was easily able to grab the IP and connect to the enclosure's management interface.

The same procedure could be applied to any machine that you don't know the IP address for, and can afford to temporarily disconnect from its network connection.

Wireshark screenshot

No comments

The Eight Best WordPress Plugins for Your Blog

WordPress is one of the most popular pieces of blogging software, and its definitely has a lot of functionality. Even if you don't know HTML or PHP, it isn't hard to learn the basics of WordPress. It took me about four hours to get my first WordPress blog set up, including finding plugins to implement additional features, searching for a theme I liked, creating various graphics in Photoshop, and modifying the theme/plugins to suit my needs. Since then, I've created several additional blogs/sites using WordPress. I've also come up with a standard list of widgets and plugins I install:

  • Akismet – Default WordPress anti-spam plugin, which helps eliminate comment spam by checking to see if they match known spam patterns in a unified database.
  • All-in-One SEO Pack – Great plugin for search engine optimization.
  • Dean's Permalinks Migration – If you configure your WordPress blog using the default settings, your posts end up as yourblog.com/year/month/day/postname. After you realize you should have used yourblog.com/postname, or something similar, for your permalinks, this plugin will help you set things straight without losing your search engine ranking.
  • Events Calendar – Allows additional calendar functionality which goes beyond the basic WordPress calendaring features. Although CompleteFusion doesn't currently utilize this plugin, I've used it on several other sites.
  • Open Web Analytics – The Open Web Analytics framework provides statistics about traffic on your WordPress blog, including number of visits, traffic sources, etc.
  • Most Popular Posts – Based on the statistics from the Open Web Analytics plugin, this plugin can display the most popular posts on your blog.
  • WP Super Cache – Helps enable your blog to withstand heavy traffic by caching pages.
  • YARQ (Yet Another Random Quote) – Randomly displays quotes you've added via the admin panel interface.
1 comment

2008 Infiniti M35 Carputer Project: Ubuntu Linux Install and Configuration

I received all the parts for my carputer, and began installing and configuring my operating system of choice — Ubuntu Linux.  Since I didn't have a cd/dvd drive attached to the carputer, I installed Ubuntu from a USB stick.  In the process, I discovered a new tool for creating USB installation media, called UNetbootin (Universal Netboot Installer).  It can be run from Windows or Linux, and has built-in support for creating USB installation media for Ubuntu, Debian, Fedora, CentOS, openSUSE, Arch Linux, FreeBSD, NetBSD, and more.  It can handle downloading the operating system's image file (.iso), or utilize one you have previously downloaded.  Since I had already downloaded a mini cd image of Ubuntu, I opted to have UNetbootin use that.

After UNetbootin finished setting up the USB stick, I used it to install Ubuntu on the carputer's hard drive.  From there, I installed openssh-server, gpsd, and wireless-tools:

apt-get install openssh-server gpsd wireless-tools

Then I set up my wireless connection with my Belkin Wireless G USB adapter as follows:

ifconfig wlan0 up
iwlist wlan0 scanning (returns your wireless network essid)
iwconfig wlan0 essid [your essid]
iwconfig wlan0 key [hex WEP key]
dhclient wlan0

Then I installed Ubuntu Mobile and the Hildon desktop, and configured a few Hildon settings:

apt-get install ubuntu-mobile xserver-xephyr hildon-desktop

I created the file /usr/share/xsessions/hildon.desktop containing:

[Desktop Entry]
Encoding=UTF-8
Name=Hildon
Exec=/usr/local/bin/start-hildon-session
Type=Application

I copied the hildon startup script:

cp `which start-hildon` /usr/local/bin/start-hildon-session

And finally, I edited /usr/local/bin/start-hildon-session and commented out "export DISPLAY=:1".

Although I made a fair amount of progress today, I still have a lot of work left:

1) Configure Ubuntu Mobile/Hildon
2) Setup touchscreen overlay film and test interface
3) Configure sound drivers and media codecs
4) Test iGuidance under wine and compare to the current state of native Linux GPS software
5) Get Creative webcam working as a rearview/backup camera
6) Setup rsync to copy newly added media when the carputer is parked in the garage and can access my fileserver over my wireless network
7) Configure bluetooth tethering/internet access through my Sprint HTC Mogul

And of course, I have to install everything into the car when the configuration is completed.

No comments

2008 Infiniti M35 Carputer Project: Parts List

As promised in my previous post, here's my parts list for my project to put a carputer into my 2008 Infiniti M35.  From what I can tell, this setup should work, and require fairly minimal effort as far as modifying the car goes. I'll still have to disassemble the dash to install the touchscreen overlay film and route the USB cable from the touchscreen overlay to the carputer, but that should be all.

Intel D945GCLF2 motherboard – $81.74 (buy.com)
One PCI slot, S-video out, and a dual core Atom 1.6Ghz.. sounds good to me.

Kingston 2GB 240-pin DDR2 667MHz RAM – $20.49 (newegg.com)
Just need a 2GB stick of memory.. nothing special required.

Western Digital 400GB My Passport USB Hard Drive – $106.99 (buy.com)
OS and media storage.. I like this better than a laptop drive because its easily removable, and is better than other external drives because it gets power over USB (no additional power required).

Globalsat BU-353 Waterproof USB GPS Receiver – $34.25 (buy.com)
Linux-compatible GPS receiver.

Belkin Wireless G USB Network Adapter – $29.74 (buy.com)
I'll use this primarily for wireless sync'ing of files when the vehicle is in my garage. Since the M2-ATX lets you specify an amount of time to run after turning the vehicle off, I'll set it to run for 20-30 minutes so it can sync up any new music/video/etc from my fileserver.

iStarUSA S3 STORM with 80W power supply – $79.99 (newegg.com)
I was going to get the voompc-2 case and M2-ATX power supply, but found this great case and included power supply for half the cost instead.  As an added bonus, it comes with an external power adapter which allows testing everything in and out of the car, independently of the in-car power wiring.

7" touch screen overlay – $40.70 (dealextreme)
This will go on top of the factory display to provide touchscreen control for the carputer.

Creative USB webcam – $0.00 (already own)
I'll use this for a rearview/backup camera.

1 comment