Tag-Archive for » vinduer «

Friday, September 11th, 2009 | Forfatter:

Peace in the land of USB

Under a *nix operating system, having multiple partitions on a USB drive isn’t rocket science, it just works. I mitt tilfelle, my USB drive has two partitions because the first partition is a bootable Arch Linux installer.

I have Windows on a desktop at homemostly for gamingand many of my colleagues use it too. Since Windows doesn’t do very well with non-Windows partitions I figured I could create a FAT32 partition on the memory stick after the bootable Arch Linux partition. FAT32 er nesten allestedsnærværende og kan brukes på alle vanlige stasjonære operativsystemer i verden.


Dessverre fungerer det ikke rett utenfor flaggermusen. Tilsynelatende, Microsoft i deres uendelige visdom bestemte at minnepinner antas å ha en (og bare en) skillevegg. I virkeligheten finner Windows den første partisjonen og ignorerer deretter andre som tilfeldigvis er satt opp:

Please Format

Err, Nei, Jeg vil ikke at du skal formatere Arch Linux-installasjonspartisjonen

Trikset for å få det til å fungere er å lure Windows til å tro at enheten er ikke en vanlig USB-minnepinne, men kanskje en solid-state harddisk som tilfeldigvis er tilkoblet via USB. Ja jeg vet, dette er alvorlig dumt at Windows oppfører seg på denne måten. En solid-state harddisk er bare en enorm stor (og raskt) minnepinne tross alt!

I found a few sources on how to do this however I still had to figure out some things on my own. Specifically, the guides I found either skipped some steps or didn’t provide enough information on where to download the driver package.

This procedure involves manually changing hardware drivers and installingnon-signeddriversnot intended for your hardware”. I know someone is going to break their system and blame me so I say now that I take no responsibility for any damage you may do to your Windows system as a result of this. Read that again. 😛


remove the highlighted text

click for larger version

Download and unzip the driver, originally created by Hitachi, her. Open the cfadisk.inf file in notepad (or your favourite plaintext editor), and find the section labeled [cfadisk_device]. Fjern delen som er uthevet til høyre:

Minimer (ikke lukk) redigereren og gå til skrivebordets ikoner – høyreklikk på Min datamaskin og velg Properties. Velg maskinvarefanen, og velg deretter [Device Manager]:

System Properties

Finn enheten under “Harddisker”, høyreklikk på minnepinnen og velg Properties:

Device Manager

Klikk på kategorien Detaljer og i rullegardinmenyen på den siden, å velge “Hardware Ids”. Klikk på den første linjen i listen over maskinvare-ID-er, og trykk Ctrl + C for å kopiere navnet:

USB Hardware Ids

Ikke lukk denne dialogboksen, gå tilbake til notisblokk (som ble minimert) og lim inn maskinvare-IDen der forrige innhold ble fjernet.

Changes pasted into notepad

Lagre filen i notisblokken og gå tilbake til enhetens dialogboksvindu. Klikk på “Sjåfør” fanen og klikk på [Update Driver…] knapp. I vinduene som dukker opp, å velge “Nei, ikke dette tNavn”; [Next] -> “Installer fra en liste eller a sspesifikk beliggenhet (Avansert)”; [Next] -> “Dikke søk. Jeg vil velge driveren som skal installeres.”; [Next] -> [Have Disk…].

Unsigned Drivers - Click Continue Anyway

Bla gjennom mappen der du har lagret den modifiserte filen CFADISK. Klikk [OK]. Du vil finne

det er en Hitachi Microdrive-driver som er oppført. Velg dette og klikk [Next]. Når advarselen

vises, klikk [YDet er]. En annen advarsel vil dukke opp angående et lignende problem (disse er “usignert” og “not intended for your hardware” advarsler jeg nevnte tidligere). Klikk [Cuansett Uansett]:

På dette tidspunktet anbefaler jeg å lukke alle dialogbokser relatert til oppsettet. Endelig, fjerne og sett minnepinnen på nytt i USB-porten, og du bør finne ut at de ekstra partisjonene på pinnen er tilgjengelige. I verste fall, trenger du kanskje fortsatt partisjonere disken men den harde delen er over. 🙂

Monday, April 06th, 2009 | Forfatter:

I came across 2 bugs on Windows Server 2003 that are also relevant to Windows XP.

Short Circuits

1. Internet Explorer‘s Desktop icon is disabled. When you double-click on the icon, expecting IE to launch, it simply produces an additional shortcut. Subsequent double-clicks again produce more shortcuts. It is possible, as a workaround, to launch IE from the Start Menu.

My first guess was that malware was attempting to make me click on these new shortcuts where the new shortcuts opened further malware. This idea quickly faded though since, if malware were to have the system privileges to produce these symptoms, it wouldn’t need me to provide further privileges.

I eventually found her what the actual problem was. I mitt tilfelle, the cause was related to IE6 being outdated. If a Windows registry entry is namedLegacyDisableand is added to specific types of registry keys, it lets Windows know that the key is obsolete and that it has only been left behind for backwards-compatibility. I dette tilfellet, it disabled the intended primaryverbfunction (the double-click) of the shortcut: launching IE.

To fix, you can either update to the latest version of IE or fix the registry entry directly. If you experience this issue even with the latest version of IE then the registry value is the only way I know how to fix it.

Danger, Will Robinson!

Though this is a trivial registry change, the registry is still a dangerous thing to mess with so, as usual, back up your registry: See KB322756. Nobody gets to blame me for trashing their system. 😛

De-Register me!

Paste the following into a .reg file and execute it; or manually remove theLegacyDisableentries referred-to here:


Fire me up!

2. When trying to browse to any site from within IE, IE remains dormant while Firefox is launched. Firefox then loads the page which was originally requested in IE.

While many might most of the time consider this to be a triumph [insert childish laughter here], the site I wanted to browse to was the Windows Updates site which, unfortunately, does not work when using Firefox. The same would apply to other sites which depend on the web browser supporting ActiveX.

De-Register Me Too!

I eventually found the solution her, and it turns out to be similar to the solution for the first bugexcept that it is to remove an entire key. En gang til, ensure you have a backup of your registry before continuing. Here is the relevant content of the .reg file:


I hope that resolves things for anyone else having similar issues. 🙂

Torsdag, January 22nd, 2009 | Forfatter:

I very recently found a problem with a client’s web site due to a .htaccess fil. The site was hosted on a Windows server running IIS using IISPassword, which makes use of .htaccess files for its settings.

IISPassword doesn’t follow exactly the same rules as with Apache derimot. If the .htaccess file exists then it must contain IISPassword-appropriate rules, otherwise the server returns only the following error:

Error 500 given by IIS Password
Here’s the content of the .htaccess file. I’ve only modified the final redirection URL to point to example.com appropriately:

RewriteEngine On
RewriteCond %{HTTP_REFERER} .*google.*$ [NC,ELLER]
RewriteCond %{HTTP_REFERER} .*aol.*$ [NC,ELLER]
RewriteCond %{HTTP_REFERER} .*msn.*$ [NC,ELLER]
RewriteCond %{HTTP_REFERER} .*yahoo.*$ [NC,ELLER]
RewriteCond %{HTTP_REFERER} .*yandex.*$ [NC,ELLER]
RewriteCond %{HTTP_REFERER} .*rambler.*$ [NC,ELLER]
RewriteCond %{HTTP_REFERER} .*ya.*$ [NC]
RewriteRule .* http://siffy-phishing-url.example.com [R,L]

If this were on a server running Apache with mod_rewrite, most web users would go directly to the correct site content. Only if they reached the site through the search engines and indexes listed in the .htaccess, would they be redirected to the siffy phishing url that the cracker wants victims to reach.

Selvfølgelig, the cracker (or perhaps even an automated worm) didn’t realise that the server in question didn’t even support these mod_rewrite rules. But either way, this is very worrying as I can foresee many arguments about whether or not the site is working

Monday, November 17th, 2008 | Forfatter:

I’d never really had the need to connect to a VPN until this weekend. After connecting, I found that my Internet access was rather non-functional except to the VPN in question. A colleague happened to be on hand (he’d given me the access details in the first place) and he quickly suggested this workaround.

Today, a client had the same issue. Perhaps this problem is more common than I first thought.

When connecting to the VPN, Windows updates the default gateway on your desktop to reflect the VPN’s settings. Most likely, derimot, you only need to access specific subnets on the VPN and you want all unrelated traffic to use your “gammel” settings.

It turns out that its a simple checkbox that needs to be unchecked. The jist (sp.??) of finding the setting: Right-click the VPN in Network Connections -> Properties -> Internet Protocol (TCP/IP); [Properties] ; [Avansert], and uncheck the “[ ] Use default gateway on remote network”.

Then click the usual OK/Apply/Yes-of-course-your-dialogue-ness (all the while reading and absorbing any warnings appropriately) until you’re back to your Network Connections window. Right-click the VPN connection and disable / re-connect.

You should be able to confirm that the Default Gateway does not change by running the command-line app ipconfig before and after enabling the VPN connection. Look specifically for the line labelledDefault Gateway”.

[edit reason=moore”]…

It turns out that a possible reason for this setting being the default setting is for security. If your desktop happens to be compromised or inadvertently routing traffic, connecting to the VPN might expose the supposedlyprivatenetwork to the Internet.

Tuesday, November 11th, 2008 | Forfatter:

I sometimes use a simplified remote desktop script I built a long time ago, before KRDC and its kin came about. It is still useful for if you normally only connect to 1 server at a time or you want your screen’s real-estate back. Feel free to adjust the defaults. 🙂

This works for generally any distro as long as you have rdesktop installed:

((Pac Man|yoghurt) -S|dukke opp|(yum|evne) installere) rdesktop

Copy the text into an appropriately-named file in your ~/bin/ folder. Then chmod it to be executable and link the second alias.

tricky@swiftspirit:~$ [ -d ~/bin ] || mkdir ~/bin
tricky@swiftspirit:~$ nano ~/bin/rd
tricky@swiftspirit:~$ chmod +x ~/bin/rd
tricky@swiftspirit:~$ link ~/bin/rd ~/bin/rdc

Også, create a folder at /media/rd that is writable only by root but readable by anyone. Then also create a second folder within this which is writable by anyone. The /media/rd folder is shared with the remote desktop when you connect so it is useful to keep small scripts or applications that you might install or need often in this folder. The /media/rd/honey folder is there for security purposes so that you can copy content to your desktop but ALSO so that a virus-infected server doesn’t infect your existing executables and scripts in the main /media/rd/ folder:

tricky@swiftspirit:~$ sudo mkdir /media/rd
tricky@swiftspirit:~$ sudo mkdir /media/rd/honey
tricky@swiftspirit:~$ sudo chown -R root:root /media/rd
tricky@swiftspirit:~$ sudo chmod 755 /media/rd
tricky@swiftspirit:~$ sudo chmod 777 /media/rd/honey

copy rd’s content from her.

Once this is in place, to connect to a server, type the command into your terminal from within your GUI:

tricky@swiftspirit:~$ rd my.server.swiftspirit.co.za

If you want to connect to a console session (session 0), use the rdc version:

tricky@swiftspirit:~$ rdc my.server.swiftspirit.co.za

Improvements and suggestions are welcome. I’d built a version which could save your passwords into a shadow file using openssl however I never quite got it to work. Maybe another time. 😉

Kategori: linux  | Tags: , , , ,  | Leave a Comment