Book Reviews


[Day Permalink] Monday, May 3, 2004

[Item Permalink]  -- Comment()
Q1 2004 Tops In Cyber Attack: "These comprise the spread of worms and viruses, number of phising incidents, unleashing of distributed denial of service attacks (DDOS), circulation of spam and overt digital attacks. The figures are mind boggling and serve as a reminder for the ongoing efforts to raise awareness and need for cyber security, both for the corporate world and home users."


[Item Permalink]  -- Comment()
If It's Urgent, Ignore It: "Smart organizations ignore the urgent. Smart organizations understand that important issues are the ones to deal with. If you focus on the important stuff, the urgent will take care of itself. [...] Urgent is not an excuse. In fact, urgent is often an indictment--a sure sign that you've been putting off the important stuff until it mushrooms out of control." [via Frank Patrick's Focused Performance Blog]


[Item Permalink] On security: Windows vs. Mac OS X -- Comment()
Tb wrote a clear comment about the security on Windows vs. Mac OS X:
The big problem on Windows vs OS X is that on Windows if you don't have all the latest patches installed, you can just look at an email and have a virus installed. This was responsible for a fair portion of the first generation viruses (virii?)

Even if you do have an up to date Windows installation, you can be fooled by a trojan horse into running a program that modifies the system on a basic level without requiring a password. On OS X all programs that affect the base system require an administrative password. The lack of that one little step, I believe is what causes a huge number of viruses to be spread.

The third factor is that Windows by default leaves many file sharing doors open and the Mac by default leaves many of those same doors closed. Window way = less secure.

Finally Windows is basically a monoculture. Windows programs are all inbred and the vast majority of Windows users spend most of their time using only MS programs. Just as in nature computer monoculture is bad mojo. This accounts for most of the rest of the viruses.

So it's not just about market share and it's not just that Mac users are smarter. There are just some basic defaults and safeguards that MS seems too bullheaded to institute and their genepool is so shallow that a good virus can wipe out thousands of machines if not tens of thousands.


[Item Permalink] Recipe for scripting Cisco VPN connections -- Comment()
Here follows my script for automating Cisco VPN using the command-line version of the program (vpnclient). The script is written in Expect. Thanks to Ssp for telling about SSHPassKey and otherwise helping with the script.

The script should be able to

  • connect automatically on sleep/awake cycles, starting/stopping AirPort etc.
  • run in the background in Terminal
  • exit properly (or handle disconnect properly)
  • integrate into Mac OS X keychain (for storing usernames and passwords)
I mapped the script below to a function key with HotApp using an AppleScript like the following:
tell application "Terminal"
    	do script with command "/path/command-name"
end tell
This opens a new Terminal window (in the background) and starts up Cisco VPN. To stop using Cisco VPN, just close the Terminal window.

Without further ado, here follows the Expect script for automating vpnconnect (the Cisco VPN command-line program):

#!/usr/bin/expect
# Cisco VPN Script
proc killvpnprocesses {} {
  spawn killall vpnclient
  expect "No matching processes belonging to you were found" {} \
         eof {}
  spawn killall cvpnd
  expect "No matching processes belonging to you were found" {} \
         eof {}
  return 0
}
set profile PROFILE
set username USERNAME
set keyname "VPN $profile ($username)"
set sshpasskey /Applications/Utilities/SSHPassKey.app/Contents/MacOS/SSHPassKey
set passwd [exec $sshpasskey $keyname]
while {1} {
  eval spawn vpnclient connect "$profile"
  expect -ex "Username \["   {send "$username\n"} \
         "A connection already exists."  {exit 2} \
         "Could not attach to driver." \
               {sleep 5; killvpnprocesses; continue} \
         "The application was unable to communicate with the VPN sub-system." \
               {sleep 5; killvpnprocesses; continue}
  expect -ex "Password \["   {send "$passwd\n"}
  expect "Your VPN connection is secure." {interact} \
         "Your link is secure." {interact} \
         "Your VPN connection has been terminated." \
               {sleep 5; killvpnprocesses; continue} \
         "Could not attach to driver." {sleep 5; killvpnprocesses; continue}
  sleep 2
  killvpnprocesses
  sleep 2
Update: I added the HTML codes for backslash characters, so you should be able to cut and paste the script from the web page.