Announcing the Certificate Watch (CertWatch) Firefox addon
CertWatch is a Firefox add-on that helps you control how digital certificates are used when you visit secure websites. While there exist tools that help control how, for example, scripts like Javascript are executed (NoScript addon), there has not been a tool for digital certificates.
The closest Firefox addon to the functionality of CertWatch is Certificate Patrol, which keeps track of website certificates and notifies when a revisited website has a different website certificate. CertWatch collects more information than Certificate Patrol and keeps track of root, intermediate and website certificates, plus visit details.
Once you install CertWatch and restart Firefox, CertWatch will take up to 30 seconds to parse all root certificates that your Firefox comes with. Every secure website that you visit is vouched for by some root certificate that pre-exists in Firefox. Your Firefox has about 150 of those root certificates, and you can traditionally view them in Edit»Preferences»Advanced»Encryption»View Certificates»Authorities.
This is Firefox 4 (beta1) with a new profile. Both Firefox 4 and Firefox 3.6.8 (as found in Ubuntu 10.04) come with 149 root certificates. If you have more than 149, then you accepted yourself extra root certificates which are fully enabled and can vouch for secure websites. As you browse, your Firefox collects intermediate certificates (I plan to explain all these in future posts at certwatch.simos.info). These are added to Firefox without user interaction, as long as the respective root certificate is in Firefox as well.
These are the preferences, accessible from Tools » CertWatch Preferences. When you visit a secure website, there is a process where the website certificate is vouched by the root certificate that Firefox already knows. Between the website and root certificates there could be intermediate certificates, creating what is called a certificate chain.
What the preferences do is specify when you should get a notification while you visit a secure website. The default preferences say that for the certificate chain of a secure website, show the certificate details if any of the website, intermediate or root certificates are encountered for the first time.
Let's visit https://addons.mozilla.org/ with CertWatch installed.
Each tab correspond to a certificate. All these three certificates are the certificate chain that verifies the secure website https://addons.mozilla.org/. The numbers at the tab names indicate how many times CertWatch encountered these certificates. It's the first time, so they all show 1. The black star ★ indicates whether the CertWatch Preferences apply for each certificate. Since the preferences indicate first time only, then all tabs get a star.
From the list of root certificates, only a handful of them will be ever used during your browsing and with CertWatch you now have the facility to figure out which ones are actually being used. At this stage I would consider this as the first most important use of CertWatch; keeping track on how many times certificates are used. If you encounter a new certificate when you visit a revisited website, then this is something to investigate.
CertWatch keeps its copy of certificates in an SQLite database in your Firefox profile. For Linux, the path is ~/.mozilla/firefox/YOURPROFILENAME/CertWatchDB3.sqlite. You can read the database with any SQLite client such as the Firefox Addon SQLite Manager or sqlitebrowser (Packaged in Debian and Ubuntu as sqlitebrowser). In the SQLite database you can view the root/intermediate certificate table, the website certificate table, and the website visits table. In all cases the full certificate is stored in case you want to contribute to the EFF SSL Observatory.
CertWatch is developed on Ubuntu Linux 10.04, with Eclipse 3.6 (Helios) and the JSDT environment.
Install the latest version of CertWatch, which is available from the addons.mozilla.org (AMO) CertWatch page.
Follow the progress of CertWatch at the http://certwatch.simos.info/ CertWatch blog.
Here are some secure websites for testing, https://www.google.com/, https://www.paypal.com/, https://www.facebook.com/, https://twitter.com/
thersa.org.uk, infected.
The screenshot shows the thersa.org.uk website has been infected, and users that visit it end up running in their browsers malicious JavaScript code. The code loads Javascript files from the .cn and the .la domains.
There is a reference in one of the files to a cookie named killav (Kill Antivirus?) that may disable some antivirus programs.
In addition, one of the JavaScript files checks which browser you have. If you have Internet Explorer 6 or 7, it loads some exploit which attempts to run binary code. If this succeeds, you are infected. If you have Firefox, it does not attempt to perform an infection, and it goes to the next phase.
The next phase is to open up pages to sites in China. It appears to me that the bussines plan in that case is to generate revenue from ad hits.
The worst thing however is if you get infected. Unpatched windows systems are at the mercy of these attackers.
One way to mitigate such risks is to use Mozilla Firefox, and have the NoScript add-on installed.
Update 5 June 2008:
The RSA updated their website by moving it away from Windows and ASP, to open source software. They are using Centos Linux, Apache, and an open-source CMS. Therefore, the above security risk does not apply any more.
My Akismet spam count in WordPress
Here is the Akismet spam count of my WordPress blog,
All spam deleted.
Caught SpamAkismet has caught 316,645 spam for you since you first installed it.
You have no spam currently in the queue. Must be your lucky day.
![]()
WordPress
Documentation — Support Forums
2.1 — 0.10 seconds
Connecting to Bluetooth devices between Linux and Windows
A common issue that arises when you connect your laptop to your Bluetooth device (such as mobile phone), is that the device forges a unique authentication with the Bluetooth stack of the operating system. What that means is that if I pair my laptop with my phone in Linux, the pairing works only in Linux. When I boot in Windows, I have to remove the pairing from the phone and establish it again in Windows. Then, when I connect to Linux I need to remove the pairing and establish it again, and so on.
The reason for this problem is that we use a single USB device (whether a dongle or module) that has a single MAC address. The mobile phone differentiates between pairings based on the MAC address.
Therefore, how can we solve this issue? A search with Google shows that it is a known issue with no answer yet. There are two avenues to fix this problem;
- get the Linux bluetooth stack to change the MAC address so that a second pairing will be possible. I am not sure if it is possible as some of the security functions probably take place on the Bluetooth hardware. Currently hciconfig does not offer an option similar to ifconfig eth0 hw ether 00:11:22:33:44:55.
- find the authentication data of the pairing on Windows and convert to the format that the Linux stack understands and accepts. In this way, a single pairing will work for both operating systes.
I do not have a solution yet. If someone can looking into these it would be great!
My hard disk does not power up
My hard disk (3.5") that I use as external storage does not power up any more.
Most probably it happened due to overheating.
Is there any way to salvage the information? Do hard disks have some sort of fuse that can get blown? I do not mind if the procedure is invasive (that is, the hard disk will get damaged while extracting the information).
Ελληνικό διαβατήριο
Ενημέρωση: Αρκετοί έχουν το ερώτημα αν μπορεί να ταξιδέψει κάποιος με Ελληνική ταυτότητα στην Τουρκία. Η απάντηση είναι ναι, μπορείς να ταξιδέψεις με ελληνική ταυτότητα στην Τουρκία.
Θέλετε να ανανεώσετε το διαβατήριό σας; Δεν μπορείτε πια διότι από φέτος αλλάζουν τα διαβατήρια, με αποτέλεσμα να χρειάζεται αίτηση για νέο. Ακόμα, γύρω στο πρώτο μισό του 2006 το νέο διαβατήριο θα είναι απλά βελτιωμένη έκδοση του παλαιότερου (με περισσότερα στοιχεία που το κάνουν πιο δύσκολο στην αντιγραφή). Μετά το διάστημα αυτό θα εκδίδεται βιομετρικό διαβατήριο, για το οποίο δεν γνωρίζω τι βιομετρικά στοιχεία θα περιλαμβάνει (γνωρίζει κανείς;).
Γενικά η έκδοση νέου διαβατηρίου είναι εύκολη υπόθεση και μπορείτε να δείτε τις απαραίτητες πληροφορίες στη σελίδα διαβατηρίων στο δικτυακό τόπο του Υπουργείου Δημοσίας Τάξεως.
Ωστόσο, υπάρχει ένα πρόβλημα. Είναι το πρόβλημα της φωτογραφίας, χρειάζεται φωτογραφία ειδικών διαστάσεων και γενικότερων προδιαγραφών. Έχω την υποψία ότι στην Ελλάδα το ζήτημα αυτό δεν είναι καν σοβαρό. Είχε κανείς πρόβλημα;
Στο εξωτερικό όμως και συγκεκριμένα σε ένα τουλάχιστον ελληνικό προξενείο γίνεται το έλα να δεις.
Πρώτα από όλα, το προξενείο δε διαθέτει λίστα με τοπικά φωτογραφεία που γνωρίζουν για τις προδιαγραφές της νές φωτογραφίας ταυτότητας. Φαίνεται ότι είμαστε η πρώτη ευρωπαϊκή χώρα με το ελαφρώς μεγαλύτερο μέγεθος φωτογραφίας. Ίσως υπάρχει στο ελληνικό σύνταγμα εντολή να μη δίνει δουλειά το κράτος σε ιδιωτικές επιχειρήσεις. Αλλού, όπως στο Foreign Office, σού δίνουν λίστα με τοπικές επιχειρήσεις που μπορούν να σε εξυπηρετήσουν, στην περίπτωση που δεν έχεις τα απαραίτητα δικαιολογητικά.
Αν είστε στο Λονδίνο, υπάρχει ένα φωτογραφείο στα δεξιά, καθώς βγαίνεται από το σταθμό Χόλλαντ Παρκ. Πρέπει να περπατήσετε 100-200 μέτρα, και είναι το πρώτο φωτογραφείο που θα δείτε. Κοστίζει 10 λίρες για 4 φωτογραφίες (για το ελληνικό διαβατήριο χρειάζεται μία μόνο φωτογραφία).
Από την άλλη πλευρά, αν έχετε ψηφιακή κάμερα, μπορείτε απλά να βγάλετε τη φωτογραφία, να την επεξεργαστείτε με το GIMP και να την τυπώσετε στο φωτογραφείο σελφ-σέρβις στο Boots του σταθμού Μποντ Στριτ για 29p (0,43 ευρώ).
Στη σελίδα για τα διαβατήρια του ΥΔΤ υπάρχει ένα κείμενο (σε μορφή .doc και .pdf) έντεκα σελίδων που περιγράφει τις προδιαγραφές. Το κείμενο αυτό έχει κάποια προβλήματα,
- Είναι έντεκα σελίδες.
- Χρησιμοποιεί τη γραμματοσειρά Comic Sans.
- Οι φωτογραφίες-δείγματα που έχει δεν είναι πραγματικών διαστάσεων.
Το προξενείο από την πλευρά του δε βοηθάει στην κατανόηση των προδιαγραφών. Ένας από τους υπαλλήλους που βρίσκεται στο χώρο αναμονής χαρακτηριστικά αναφέρει
Φωτογραφίες; Εγώ το διαβατήριο θα το βγάλω στην Ελλάδα.
Δύο άτομα είχαν έρθει από τη Σκωτία (μεγάλη απόσταση, ταξίδι πολλών ωρών) και έδειξαν τις φωτογραφίες στον υπάλληλο στο χώρο αναμονής. Ο υπάλληλος πήρε τις φωτογραφίες και τις έδειξε σε μια υπάλληλο που ασχολείται με τη συμπλήρωση των δικαιολογητικών. Μετά επιστρέφει.
- Με συγχωρείτε, οι φωτογραφίες δεν κάνουν.
- Τι πρόβλημα έχουν;
- Αυτό δεν μπορώ να σας το πω.
- Και τι μπορώ να κάνω; Πως μπορώ να μάθω τι πρόβλημα υπάρχει;
- Πρέπει να περιμένετε μέχρι το τέλος αν θέλετε να ρωτήσετε κάτι.
Τα ελληνικά προξενεία δεν κάνουν την έκδοση των νέων διαβατηρίων. Συγκεκριμένα, στέλνουν τις συμπληρωμένες αιτήσεις με διπλωματικό φάκελο κάθε ****** (ημέρα) στην Αθήνα και υπάρχουν ****** (αριθμός) αστυνομικά τμήματα στην Αττική που κάνουν την έκδοση. Πως έμαθα τις λεπτομέρειες αυτές; Είναι θλιβερό, ίσως το αναφέρω σε άλλη εγγραφή.
Στις δημόσιες υπηρεσίες υπάρχουν διάφορα προβλήματα που αντιμετωπίζουν οι πολίτες, και αντί να υπάρχει κάποια διαδικασία που να διαπιστώνει "Είναι η 300στη φορά που οι πολίτες είχαν το πρόβλημα αυτό, υπάρχει κάτι που θα μπορούσαμε να κάνουμε;", το πρόβλημα παραμένει. Υπήρξε ένα ζήτημα στη δική μου έκδοση διαβατηρίου και έβαλα τις φωνές στον υπάλληλο που βοηθάει στο χώρο αναμονής. Κάτι τέτοιο (να βάλω τις φωνές) δεν το κάνω καθόλου συχνά και ζητώ συγγνώμη. Το σουρεαλιστικό της κατάστασης ήταν όταν έφευγα από το προξενείο με το νέο διαβατήριο· κάποιος ζητούσε πληροφορίες για παρόμοιο ζήτημα και οι οδηγίες που έλαβε δεν ήταν διόλου διαφωτιστικές...
Αν το έχετε ανάγκη για τη φωτογραφία σας, μπορώ να φτιάξω ένα βοηθητικό αρχείο XCF (για GIMP, διαθέσιμο σε κάθε σύστημα Linux, υπάρχει και για Windows). Απλά θα κάνετε επικόλληση (paste) της φωτογραφίας σας και θα υπάρχουν οδηγοί (γραμμές guides) για το μέγεθός της. Αποθηκεύετε το αρχείο σε USB stick, memory card ή CD και το τυπώνετε σε κάποιο από τα μαγαζιά που έχουν σύστημα σελφ σέρβις.
Ενημέρωση: Λίστα με εγγραφές ιστολογίων για τα νέα διαβατήρια.
- http://parazalismeni.blogspot.com/2006/05/blog-post_24.html
- http://blog.kwstis.net/archives/92
- http://tseligkas.blogspot.com/2006/04/move-on.html
- http://provatos.blogspot.com/2005/12/blog-post.html
- http://arxediamedia.blogspot.com/2006/03/yxeeeia-to-atynomiko-tmhma.html
- http://mikro.blogspot.com/2006/02/blog-post_14.html
- http://alexistamatis.blogspot.com/2006/03/blog-post_114232565222965010.html
Taxis and security
It is quite encouraging that citizens taxed in Greece are able to file their tax reports through the Web, at the Taxis Website. Sadly, it has been reported that standard-compliant Web browsers are not supported by the Taxis Website. If you are affected, do complain about it! If you file taxes and you are affected, file a report.
Let's see some more issues.
A. The main login page is not configured properly with regards to the autocomplete feature found in modern browsers; as is, your username and password get saved by default in your browser. If your computer is stolen or a trojan horse gets installed on your computer, your tax details are gone!
The Web developer should modify the HTML code from
< span class=“textblue2″>< b>user name: b>span>
< input type=“text” name=“username” maxlength=“40″ size=“15″ value=“testing”>
< P>< span class=“textblue2″>< B>password:B>span>
< input type=“password” name=“password” maxlength=“40″ size=“17″ value=“testing”>
to
< span class=“textblue2″>< b>user name: b>span>
< input type=“text” name=“username” autocomplete=“off” maxlength=“40″...
< P>< span class=“textblue2″>< B>password:B>span>
< input type=“password” name=“password” autocomplete=“off” maxlength=“40″...
B. The page http://webtax.gsis.gr/taxisnet/login.do claims that users are protected by Verisign (SSL/TLS). Quite sadly, the intent has probably been that users will connect through the proper URL, at https://webtax.gsis.gr/taxisnet/login.do. Dear Taxis, you should place an HTTP redirection to move all users to the SSL/TLS-protected URL. You are in breach of your Verisign license!

I will follow on the above report here.
Actually, it would be much better if the web server is SSL/TLS only (no plain HTTP version available). The web server should be configured at any access to a URL under http://webtax.gsis.gr/... should redirect to https://webtax.gsis.gr/.
C. What is worst of all, the website provides content in the 8859-7 8-bit legacy encoding. It is much better to convert to Unicode and UTF-8. I do not know if users have to write text in Greek for their tax forms...
I don't file taxes so I am not sure if there are more issues once you logon.
Update: The http://webtax.gsis.gr/taxisnet/login.do URL does not work anymore (it forwards to another Website which is down). I did not hear back from Verisign; it's possible that the two events are linked together.
Τι εκτυπώνει το πρόγραμμα; [Λύση]
#include <stdio.h> int calculate(void); int calculate(void) int p[9]; for ( i = 0; i <= 3; i++ ) int main(int argc, char** argv) calculate(); return 0;
{
int i;
p[i*3+2]+=16;
}
{
printf("Hello, World!\n");
}
Μεταγλωττίζουμε το πρόγραμμα της προηγούμενης εγγραφής και εκτελούμε (πλατφόρμα Linux/i386, gcc 4.0.x).
simos@home /tmp
$ gcc calculate.c -o calculatesimos@home /tmp
$ ./calculatesimos@home /tmp
$ _
(Αν η προτροπή του φλοιού (shell) φαίνεται παράξενη, χρησιμοποιώ tcsh με tcshrc).
Όπως βλέπουμε, το πρόγραμμα calculate δεν εκτυπώνει τίποτα, ενώ στον κώδικα υπάρχει αναφορά να εκτυπώσει Hello, World!. Στον κώδικα δεν υπάρχει κάποια εντολή που να παρακάμπτει την εκτύπωση του μηνύματος. Τι συμβαίνει; Μπορεί η κλήση της αθώας συνάρτησης calculate() να επηρεάσει την ροή του προγράμματος;
Ας δούμε τι γίνεται στη συνάρτηση calculate(). Όταν η μεταβλητή i παίρνει την τιμή 3, γίνεται τροποποίηση του πεδίου p[11] του πίνακα p. Ο πίνακας p διαθέτει 9 θέσεις (p[0] μέχρι p[8]), οπότε σε τι πράγμα τροποποιήσαμε την τιμή;
Η C/C++ είναι μια γλώσσα untyped, που σημαίνει μεταξύ άλλων ότι είναι καθήκον και υποχρέωση του προγραμματιστή να προσέχει να μην γράφει σε θέσεις μνήμης που δεν έχει δεσμεύσει.
Οπότε, στο παράδειγμά μας πού γράψαμε στην μνήμη;
Με την εντολή objdump -d calculate μπορούμε να δούμε το πρόγραμμα σε μορφή γλώσσας μηχανής.
Ακολουθεί απόσπασμα από τον κώδικα της συνάρτησης main().
...
80483c4: b8 00 00 00 00 mov $0x0,%eax
80483c9: 83 c0 0f add $0xf,%eax
80483cc: 83 c0 0f add $0xf,%eax
80483cf: c1 e8 04 shr $0x4,%eax
80483d2: c1 e0 04 shl $0x4,%eax
80483d5: 29 c4 sub %eax,%esp
80483d7: e8 a0 ff ff ff call 804837c <calculate>
80483dc: 83 ec 0c sub $0xc,%esp
80483df: 68 98 84 04 08 push $0x8048498
80483e4: e8 bf fe ff ff call 80482a8 <puts @plt>
80483e9: 83 c4 10 add $0x10,%esp
80483ec: b8 00 00 00 00 mov $0x0,%eax
80483f1: c9 leave
80483f2: c3 ret
80483f3: 90 nop
-- τέλος της main() --
Προσέξτε την κλήση της συνάρτησης calculate() [θέση 80483d7]. Στον δομημένο προγραμματισμό έχουμε κλήσεις συναρτήσεων/υπορουτινών που μεταφέρουν την ροή εκτέλεσης σε ένα άλλο κομμάτι προγράμματος, και μετά επιστρέφουν για να προχωρήσουν στην επόμενη εντολή. Πως θυμάται το πρόγραμμα σε εκτέλεση ποια είναι η επόμενη εντολή (στην περίπτωση μας, η εντολή στην διεύθυνση 80483dc);
Την θυμάται επειδή την τοποθετεί στην στοίβα, σε μια περιοχή μνήμης που είναι εύκολα προσβάσιμη από την καλούμενη συνάρτηση (calculate() στην περίπτωσή μας). Στο παράδειγμα
int calculate(void)
{
int i;
int p[9];
το p[11] δείχνει στην διεύθυνση μνήμης που περιέχει την επόμενη εντολή που θα εκτελέσει ο επεξεργαστής μόλις ολοκληρώσει την εκτέλεση της συνάρτησης calculate(). Ένα ενδιαφέρον σημείο είναι ότι το p[9] είναι το ίδιο με την μεταβλητή i! Δηλαδή αν τροποποιήσουμε κατά λάθος το p[9], θα αλλάξει και το i, διότι δείχνουν στην ίδια περιοχή της μνήμης.
Στο πρόγραμμά μας προσθέτουμε 16 στο p[11]. Γιατί 16; Η σωστή τιμή του p[11] είναι 0x80483dc, εμείς όμως θέλουμε να παρακάμψουμε την εκτύπωση του μηνύματος (printf()). Θέλουμε δηλαδή να πάμε στην διεύθυνση 0x80483ec (εντολή return 0;).
0x80483ec - 0x80483dc = 0x10 ή 16 στο δεκαδικό σύστημα, οπότε πρέπει να προσθέσουμε 16 στην διεύθυνση επιστροφής.
Σοβαρό πρόβλημα ασφάλειας στο WordPress 1.5.1.3 (τελευταία έκδοση)
Σε συνέχεια του προηγούμενου άρθρου, υπάρχει σοβαρότατο πρόβλημα ασφάλειας στο WordPress 1.5.1.3 (Strayhorn) και δεν αναμένεται να εκδοθεί διορθωμένη έκδοση στο άμεσο μέλλον.
Είναι σημαντικό το πρόβλημα; Ναι, πολύ, διότι υπάρχει εύκολα διαθέσιμο πρόγραμμα exploit που ο καθένας μπορεί εύκολα να εκτελέσει.
$ wp-exploit.pl http://www.victim.com/blog/ 'system(\"uname -a;id\");'
Εδώ γίνεται εκτέλεση των εντολών uname -a και id για να εμφανιστούν περισσότερες πληροφορίες από το σύστημα που υπάγεται το ιστολόγιό σας. Άλλες εντολές θα μπορούσαν να είναι rm -fr / κτλ.
Για να δείτε αν υπάρχει πρόβλημα στο ιστολόγιό σας, εκτελέστε το phpinfo() για να δείτε αν είναι ενεργοποιημένη η ρύθμιση
register_globals On On
Γενικά, η ρύθμιση register_globals είναι καλό να είναι ανενεργή. Όμως, αν το ιστολόγιό σας βρίσκεται σε σύστημα που δεν έχετε πρόσβαση για να κάνετε τέτοιες αλλαγές, ή δεν σας επιτρέπουν να έχετε αρχεία .htaccess, τότε έχετε σοβαρό πρόβλημα...
Παίζοντας με Unicode
Αν σας πει κάποιος να ψάξετε την σελίδα αυτή για την λέξη ТОМАТА, θα το γράψετε στα ελληνικά και θα ψάξετε, μιας και ότι διαβάζετε εδώ είναι στα ελληνικά. Αν δείτε ότι δεν μπορεί να το βρει η αναζήτησή του Firefox σας, θα σκεφτείται, θα το έγραψε στα αγγλικά. Ας κάνω αναζήτηση στα αγγλικά. Αν πάλι δεν το βρει η αναζήτηση, τότε κάτι συμβαίνει...
Μμμμ, μπορεί να το έγραψε μισά ελληνικά, μισά αγγλικά, που σημαίνει ότι γίνεται αρκετά δύσκολο να βρεθεί μια απάντηση.
Υπάρχει άλλο επίπεδο δυσκολίας;



