プログラム解析入門 もしくはC/C++を安全に書くのが難しすぎる話 Last updated: Jul 30, 2022 Kinuko Yasuda <@kinu>
1. qiraとは qiraとは世界的なハッカー、George Hotz氏 (ジョージ・ホッツ - Wikipedia) によって開発された高機能バイナリトレーサーであり、qiraという名は(QEMU Interactive Runtime Analyser)の略である。 GitHub - BinaryAnalysisPlatform/qira: QEMU Interactive Runtime Analyser 略語を見れば分かるがuser mode QEMUを使用したバイナリ解析ツールであり、ELFなどの実行形式バイナリを実際に動作させて各命令のレジスタ、メモリへの操作を逐次記録する。 これらの記録はweb UIを通して好きな命令位置にカーソルを移動させるだけで見ることができ、その時のレジスタ、メモリの記録が再現される仕組みになっている。ソフトウェアのデバッグやCTFにおけるバイナリ解
C/C++の静的解析は、どう考えても大変なんだけどどう考えても需要が高いので、やはり色々なソフトウェアや事例があるようだ。まとまった情報が欲しいけど見つからなかったので自分の調べた範囲でまとめることにした。 他にも耳寄りな情報があったら教えてほしい。 静的解析を行うことができるソフトウェア 調べてみると結構たくさんある。それぞれの特徴とかあまりよくわからない。 (個人的には、とりわけ網羅的な形式的検証ができるツールの性能に興味があるので、それを中心に集めていたが、やはり網羅的とは限らないで探すともっとたくさん見つかるようだ。もちろん網羅性にはトレードオフがある) Frama-C …… C言語に形式手法を適用するための汎用のフレームワークで、静的検証のためのプラグインも多数(WPとかValueとか)存在する。網羅的な検証から発見的な手法、動的な手法まで様々ある。研究で使うのに便利そう Ast
Scrutinizerが凄い!! ScrutinizerというサービスがPHPの静的解析出来て凄いというスライドを読んで試しに使ってみたら思いの外すごかった。 公式サイトURL https://scrutinizer-ci.com/ スライドの記事 http://www.slideshare.net/hinakano/scrutinizer-ciphp オープンソースのリポジトリ(publicリポジトリ?)なら無料で利用出来るようです。 静的解析が優秀! Scrutinizerでは初期設定の段階で、php-sim、pdepend、php-analyzerツールが有効になっています。 これらツールの他に設定で、 PHP Code Sniffer PHP Change Tracking Analyzer PHP CS Fixer PHP Mess Detector Security Advis
ZXing ("Zebra Crossing") Team による「QR コードスキャナー」 (以下、"ZXing スキャナ"と略記) は操作性が良く人気の高い定番 Android アプリのひとつです。同アプリでは ZXing Team 自らが開発を継続しているオープンソースのバーコード処理用ライブラリが使用されています。 このライブラリの優秀さはスマートフォンでバーコード/QR コードを処理する際の実質標準の座にある状況からも裏打ちされていますが、ZXing スキャナの「使いやすさ」は本ライブラリの性能のみに依るものではなくアプリの実装に大きく支えられています。ZXing スキャナのソースコードは公開されているので、それに学べば本家と同等の使いやすさを備えた QR コードリーダーの自作が可能となるはずですね。操作性の良いリーダーを自作できるのであれば QR コード読み取り機能をアプリへ組
はじめに Allocation Tracker はある時間とある時間の間でメモリにどのような種類のオブジェクトがアロケート(割り当て)されたかを調べることができるツールです。Android SDKに含まれている機能なのでAndroidの開発環境が最低限整っていれば誰でも使用することができます。 前回のブログでは概要のみでしたので、今回はこのツールの機能と活用方法について具体的に見ていこうと思います。 アロケートを確認してみる 説明が多くても分かりづらいと思うので、まずはアロケートを確認してみましょう。 例として、以下のようなカスタムViewを作りました。 CustomView.java package jp.classmethod.android.sample.sampleproject; import android.content.Context; import android.gra
Heap dump とは Heap dump は現時点でどのようなオブジェクトがメモリに確保されているか解析するための機能です。 動作中のアプリの任意のタイミングでヒープのスナップショットをとる (HPROF形式のファイルとして出力する) ことができます。 このツールも Allocation Tracker と同様、Android SDKに含まれている機能なのでAndroidの開発環境が最低限整っていれば誰でも使用することができます。 今回は Eclipse Memory Analyzer (以下MAT) の使用方法を通して、 Heap dump を利用したメモリ解析について解説したいと思います。 Androidアプリのヒープ領域 ヒープ領域とは、動的に確保できるメモリ領域のことを指します。Androidのヒープ領域は Linuxヒープ (ネイティブヒープ) と Dalvikヒープ (Ja
はじめに よりよいアプリをつくるためには、メモリ管理はとても重要です。 スマホはPCと違ってメモリ不足がとても起こりやすいので、メモリ管理への考慮が不十分だと OutOfMemory (メモリ不足によるエラー) がすぐに発生し、アプリが強制終了してしまいます。また、メモリ不足の状態のアプリはとてもパフォーマンスが悪く、ユーザーの思いがけない誤操作にもつながります。システム全体や他のアプリに影響を与えてしまうことも考えられます。 つまり実装はもちろん、画面遷移やレイアウトのデザイン、仕様などAndroidアプリ開発のすべてのプロセスにおいて 「メモリ消費を抑える」 という点を常に配慮する必要があります。 ということで、このシリーズではAndroidアプリにおけるメモリ管理の方法やツールの紹介、実装のコツなどのTipsを紹介していきたいと思います。 今回は第一回目ということで、アプリのメモリ使
wonderflは、サイト上でFlashをつくることのできるサービス。 通常Flashをつくるためには、Flash IDEやFlex、FlashDevelop等といったツールを使って、コードを書き、コンパイルする必要がありますが、wonderflでは、サイトにあるフォームにActionscript3のコードを書けば、サーバサイドでコンパイルを行えます。 つまり、ブラウザさえあれば、Flashをつくれます。コンパイル結果はサイト上に表示され、作成されたFlash(swf)はページ上に自動的に表示されるので、完成したFlashをリアルタイムに見ながらコードを書くことができます。 ※APIとして、はてな OpenIDを使用してネットにさえつながれば、誰もがFlashクリエイターになれます。世界中のFlashクリエイターがユーザーになるwonderflは、 文字通り、世界のFlash図鑑となってい
googleのAndroid開発者向け ブログに「Memory Analysis for Android Applications」という記事があったため、自分のために訳しました。参考になれば幸いです。本エントリを見るうえで、eclipse の基本的な使い方を理解している必要があります。 Androidアプリのメモリ解析手法 Dalvikランタイムは、ガベージコレクトしてくれるかもしれませんが、それはメモリ管理を行わなくてもよいというわけではありません。モバイル端末上でのメモリ利用状況は特に注意を払わなければなりません。本投稿では、開発するアプリのメモリ利用状況の把握を支援する Android SDK で提供しているメモリプロファイリングツール群のいくつかを紹介させて頂きます。 メモリ利用時の問題はいくつか明らかになっています。例えば、もしあなたのアプリがユーザの画面タッチ操作のたびにメモ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く