在 QEMU/KVM 上跑 Mac OS X...

在「Running OS X Mavericks under QEMU with KVM」這篇看到的。

開頭就提到了目前的情況:

Virtualizing OS X is a thing that can today be done very easily, with VMware and VirtualBox fully supporting it under OS X hosts. But what about virtualizing it using a bare metal hypervisor and QEMU? Under Linux? Finally I've got Mavericks fully working under QEMU (with no extra kexts(!)) and it wasn't easy.

OS X Mavericks 是 10.9,過不久後文章應該會再度更新吧...

用統計方法反推 JavaScript 壓縮程式的變數名稱

JavaScript 在正式提供服務時一般都會使用「YUI Compressor」、「UglifyJS」或是「Closure Compiler」壓縮後再拿到正式環境上使用,最主要的目的是為了降低網路傳輸量。

這些工具其中一個特點是,local function 與 local variable 會被較短的名字取代掉,這可以讓想要反組譯的人比較麻煩。

不過今天看到的這個工具可以解決「困擾」:「JSNice」。(在 Slashdot 上的「Machine Learning Used For JavaScript Code De-obfuscation」這篇看到的)

用統計方法去「猜測」這些 local function 與 local variable 應該叫什麼名字,讓人比較好理解。官方對準確度的說法是超過 60%:

In our experiments, we found JSNice to be effective for deobfuscating minified code. On average, more than 60% of the identifiers are recovered to the same name as before the minification process.

接下來會想辦法提供 UI 讓使用者可以選擇另外的名字:

Further, as JSNice computes multiple ranked suggestions, we provide a UI to navigate through these suggestions and select alternative identifier names.

先記錄起來,這網站很有趣,之後要 trace 別人的程式碼應該常常會用到 XDDD

OpenSSL 安全通報連發...

熱騰騰的「OpenSSL Security Advisory [05 Jun 2014]」:

  • SSL/TLS MITM vulnerability (CVE-2014-0224)
  • DTLS recursion flaw (CVE-2014-0221)
  • DTLS invalid fragment vulnerability (CVE-2014-0195)
  • SSL_MODE_RELEASE_BUFFERS NULL pointer dereference (CVE-2014-0198)
  • SSL_MODE_RELEASE_BUFFERS session injection or denial of service (CVE-2010-5298)
  • Anonymous ECDH denial of service (CVE-2014-3470)

這太熱鬧了,第一個 security issue 可以在 MITM 的情況下,強迫選用比較差的 cipher:

An attacker using a carefully crafted handshake can force the use of weak keying material in OpenSSL SSL/TLS clients and servers.

第三個則有可能直接爆破執行程式碼:

A buffer overrun attack can be triggered by sending invalid DTLS fragments to an OpenSSL DTLS client or server. This is potentially exploitable to run arbitrary code on a vulnerable client or server.

接下來幾天對 SA 來說又是無止盡的升級地獄...

CVE-2014-0476:掃 Rootkit 的程式變成 Rootkit?

Twitter 上看到居然用這張圖:

CVE-2014-0476 比較完整的說明可以看 Red Hat 的 Bugzilla 上給的說明:「Bug 1104455 – CVE-2014-0476 chkrootkit: local privilege escalation」。

阿彌陀佛...

Vagrant 1.6.3

Vagrant 官方沒公告,但在 GitHub 上可以看到 Changelog:「1.6.3 (May 29, 2014)」。

本來在 Docker provider 上有兩個 workaround 要設定 (docker.has_ssh 以及 override.ssh.port),現在都不需要了,預設值就有幫你自動偵測:

  • providers/docker: Better error messaging when SSH is not ready direct to container. [GH-3763]
  • providers/docker: Don't port map SSH port if container doesn't support SSH. [GH-3857]
  • providers/docker: Proper SSH info if using native driver. [GH-3799]
  • providers/docker: Verify host VM has SSH ready. [GH-3838]

這樣處理起來又方便一些...

HDFS 上的 Memory Storage

Apache Spark 以記憶體操作為賣點的想法,有人提出來直接讓 HDFS 支援 Memory Storage 了:「Discardable Distributed Memory: Supporting Memory Storage in HDFS」,文章的副標題「HDFS's storage subsystem gets a boost with discardable distributed memory」也說明了特性。

整個計畫在「[HDFS-5851] Support memory as a storage medium - ASF JIRA」這邊可以看到。

不過 Spark 帶來的想法現在才有進度... 這發展的速度也太快了 XD

Defensive BASH Programming

2012 年的老文章了,不確定是 Zite 上看到,還是 Hacker News Daily 上看到的:「Defensive BASH Programming」。

不是給初學者看的文件,而是寫給對 shell script 有一定基礎的人。針對要怎麼樣才能寫出容易維護,而且問題又少的 code 所提出來的準則,但也未必適用於每一個人 (或是團體)。

這篇文章的好處是有說明為什麼這樣規範,重點在吸收這些想法。

讓 Windows XP 活更久的方法...

Windows XP 的支援到 2014 年 4 月 8 日結束,而這表示在這之後 Windows XP 將不會有安全性更新 (除了特殊的情況)。

不過,Windows Embedded POSReady 是 Windows XP 的一個分支版本,則支援到 2019 年。而網路上應該有不少媒體都報過了 (像是「Windows XP rises from the grave: Simple hack gives you five more years of updates」),可以利用改 registry 的方式讓 Windows XP 收這些更新:

HKEY_LOCAL_MACHINE\SYSTEM\WPA\PosReady\ 下增加一筆 Installed (DWORD,值為 1)。

這是目前使用 Windows XP 最好的方式了。

Update:本來的 key 有錯誤。

AWS 推出信用卡式的 MFA

AWS 推出信用卡式的 MFA:「A Convenient New Hardware MFA Form Factor」。

一樣是跟 Gemalto 合作。相較於之前掛在鑰匙圈上變得更容易收納 (可以放到皮夾內):

實體的 OTP 還是比 app 形式的安全強度好,變成信用卡形式後應該再弄一片來玩玩...