ちゃっぴの監禁部屋

ガチガチに締めすぎて動きがとれなくなる。。。

ホーム 連絡をする 同期する ( RSS 2.0 ) Login
投稿数  405  : 記事  5  : コメント  12043  : トラックバック  134

ニュース

記事カテゴリ

書庫

日記カテゴリ

Communities

Personal Information

機密情報を扱う場合、その情報が漏えいできないように最大限の配慮を払う必要があります。Disk 等の永続化された storage には保存しないとか、保存する場合は必ず暗号化して格納すべきなんてのは結構浸透していると思いますが、memory はどうでしょうか?

Memory 上の data は他の data と違い保護していないことがほとんどではないかと思います。というのは memory 上の data はあくまで一時的なものであり、永続化される可能性が低いため優先度はどうしても低くなってしまいますね。

ただ、memory でも永続化される状況が存在します。Crash dump, paging file, 休止状態で使われる hibernate file には出力される可能性がありますね。Paging file への出力は VirtualLockAllocateUserPhysicalPages のような関数を利用して利用している virtual addressworking set address に固定化することにより防止することはできますが、それ以外は無理ですね。また、debbuger を使って直接 memory に attach することにより読み取ることも可能です。

これらのことを考慮するなら機密情報はたとえ memory 上でも簡単には読み取れないように保護すべきです。

通常の場合この手の保護は暗号化を使って保護するのですが、今回対象は memory 上の data であるため、一時的には暗号化解除した情報が必要になる場合がほとんどでしょう。その場合どうするべきか?

使い終わったらすぐに消してやる。すぐに data を消しこんでやることで情報漏洩の risk を最低限にすることができます。正直これしか対処のしようがありません。

ただし、問題があります。通常の解放処理では memory 上の data の消去はされません。開放済みと mark されるだけで、その memory が再利用されるときまで memory 上に data は残っています。これを防ぐためには、開放前に対象の address に対して別の data を上書きします。Win32 にはこの処理用として SecureZeroMemory が用意されています。

似たような処理を行うものに memsetZeroMemory なんてものもありますが、最適化により省略されてしまう必要があるので、必ず SecureZeroMemory を利用しましょう。この仕組みについて詳しく知りたければ「良いニュースと悪いニュース」を参照するとよいでしょう。また、下記書籍にも詳しく解説されています。

Writing Secure Code 第2版 上

投稿日時 : 2010年1月1日 20:35

コメント

# Managed code で機密情報を扱う 2010/01/02 22:33 ちゃっぴの監禁部屋
Managed code で機密情報を扱う

# 自動的に 0 埋めしてくれる Class 2010/01/02 23:03 ちゃっぴの監禁部屋
自動的に 0 埋めしてくれる Class

# re: Memory ????????? 2021/08/07 13:32 what is hydrochloroquine
hloroquine https://chloroquineorigin.com/# hcq malaria

# hjcklskkjmpe 2022/06/03 18:29 hkwqohjh
uses for erythromycin https://erythromycin1m.com/#

# steps to write a good essay b42aty 2022/09/08 17:56 AaronBlact

Nicely put. Thanks. https://definitionessays.com/ type of essays writing

# hydroxychloroquine tablets buy online 2022/12/25 21:15 MorrisReaks
http://www.hydroxychloroquinex.com/# aralen for sale

# research paper writing service review n59pie 2023/03/01 1:09 StevenGrelo

Great knowledge. Thanks!
custom papers https://service-essay.com/ college paper writing service virginia

# thesis for doctorate degree x58buf 2023/03/03 0:45 Josephbried

Great facts. Thanks!
a thesis statement about public service https://writingthesistops.com/ doctorate thesis

# my custom essay p471rb 2023/03/06 8:57 Gregorysaipt

Many thanks! Loads of material.
what are the best resume writing services https://essayservicehelp.com how can i write an essay https://essayservicehelp.com

# how to properly write an essay h37qja 2023/03/06 20:29 EugeneSib

Regards. Valuable stuff!
buy essay online https://buycheapessaysonline.com easy essay writer https://custompaperwritingservices.com

# custom writing cheap j74wec 2023/03/07 7:35 Gregorysaipt

Terrific content. Thanks a lot.
how to write a successful essay https://essayservicehelp.com how to write a informative essay https://bestmasterthesiswritingservice.com

# essay helpers n31aja 2023/03/08 3:29 EugeneSib

Appreciate it. Plenty of information.
professional dissertation help https://buyanessayscheaponline.com how to write a dissertation https://bestonlinepaperwritingservices.com

# best web content writing services w72pnj 2023/03/08 18:54 EugeneSib
You actually said this perfectly!
dissertation english https://bestonlinepaperwritingservices.com undergraduate dissertation https://domyhomeworkformecheap.com

# buy an essay online cheap e82pzg 2023/03/09 4:08 Gregorysaipt

Many thanks! A lot of content!
write my essay.com https://payforanessaysonline.com how to write a comparative essay https://writeadissertation.com

# consumer reports resume writing services y79yrz 2023/03/09 11:14 EugeneSib

Very good information, With thanks.
great writing 3 from great paragraphs to great essays https://writingpaperforme.com it dissertation https://writingresearchtermpaperservice.com

# define disertation y87meg 2023/03/10 1:52 EugeneSib

Amazing many of superb material.
college life essay https://helpwritingdissertation.com mba essay services https://writinganessaycollegeservice.com

# steps to writing a narrative essay f78cwq 2023/03/10 16:10 EugeneSib

You've made the point!
what to write on a college essay https://bestpaperwritingservice.com best online resume writing services https://researchpaperwriterservices.com

# how to write a college essay about yourself v76pum 2023/03/10 23:04 Gregorysaipt

Many thanks! A good amount of knowledge!
personal statement writing help https://essayservicehelp.com easy steps to writing an essay https://helpwritingdissertation.com

# essay writing checker c847md 2023/03/11 7:16 EugeneSib

Nicely put. Appreciate it!
i need help with my college essay https://homeworkcourseworkhelps.com uc college essays https://essaywritingserviceahrefs.com

# content writing service a463do 2023/03/11 20:50 Gregorysaipt
You actually mentioned that perfectly.
diversity college essay https://bestpaperwritingservice.com how to write short essay https://helpwithdissertationwriting.com

# help writing a compare and contrast essay f481fo 2023/03/13 3:32 EugeneSib
You actually revealed it exceptionally well.
reliable essay writing service https://custompaperwritersservices.com writing a argumentative essay https://domyhomeworkformecheap.com

# how to write perfect essay a196jm 2023/03/13 18:07 EugeneSib

Regards. Quite a lot of forum posts.
what is a disertation https://helpwritingdissertation.com us essay writing service https://helpwithdissertationwriting.com

# custom essay company a76ynm 2023/04/03 9:02 EugeneSib

Truly quite a lot of very good tips.
need help writing a essay https://essaywriting4you.com disertion https://helpmedomyxyzhomework.com

# The plugins developed for WordPress 2023/05/09 23:16 Justas
The plugins developed for WordPress serve to enhance the features and functions of a WordPress website, allowing you to build your awesome and functional site https://t.me/wpigaming/648 Customise WordPress with powerful, professional and intuitive fields.

Post Feedback

タイトル
名前
Url:
コメント