0

最近、私は計算機プログラムをグラフ化するための圧縮プログラムの作成に取り組んでいます。これはスペースが最小限であり、計算機 OS は、命令ポインターを任意のアドレスに設定しても気にしません。

私は基本的な DEFLATE を実装してから、実行可能コードでより適切に機能する可能性のある圧縮アルゴリズムをグーグルで検索しようとしました。

しかし、ここに私の質問があります。DEP を備えた最新の OS では、プログラムが抽出されたコードを (少なくとも直接ではなく) 実行することを許可しないでしょうか? すべての「パックされた実行可能ファイル」は、データの解凍、または圧縮されていないインタープリターに抽出されたコードの実行、またはその中間に制限されていますか?

4

1 に答える 1

2

wouldn't any modern OS with DEP disallow a program to execute extracted code (at least not directly)

Less-directly there is of course no problem. Even with W^X, the unpacker can simply write the code to writable memory, and only then turn it into executable memory.

Though on many operating systems, even with DEP support, a program is allowed to allocate memory that is both writable and executable. DEP does not stop you from doing things that you have the permission to do.

于 2017-11-07T12:58:50.320 に答える