<?xml version="1.0" encoding="UTF-8" ?><rdf:RDF 
  xmlns="http://purl.org/rss/1.0/"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:atom="http://www.w3.org/2005/Atom"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xml:lang="ja">
  <channel rdf:about="http://w.atwiki.jp/okamo_sec/">
    <title>セキュリティ、仮想化、web、Linux</title>
    <link>http://w.atwiki.jp/okamo_sec/</link>
    <atom:link href="https://w.atwiki.jp/okamo_sec/rss10.xml" rel="self" type="application/rss+xml" />
    <atom:link rel="hub" href="https://pubsubhubbub.appspot.com" />
    <description>セキュリティ、仮想化、web、Linux</description>

    <dc:language>ja</dc:language>
    <dc:date>2014-02-24T23:25:41+09:00</dc:date>
    <utime>1393251941</utime>

    <items>
      <rdf:Seq>
                <rdf:li rdf:resource="https://w.atwiki.jp/okamo_sec/pages/31.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/okamo_sec/pages/30.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/okamo_sec/pages/29.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/okamo_sec/pages/28.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/okamo_sec/pages/27.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/okamo_sec/pages/26.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/okamo_sec/pages/25.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/okamo_sec/pages/24.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/okamo_sec/pages/23.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/okamo_sec/pages/22.html" />
              </rdf:Seq>
    </items>
	
		
    
  </channel>
    <item rdf:about="https://w.atwiki.jp/okamo_sec/pages/31.html">
    <title>論文関連</title>
    <link>https://w.atwiki.jp/okamo_sec/pages/31.html</link>
    <description>
      こんなはやく英語論文かくとおもわなんだ。。。
ということで、決まり文句を集める

***単語とか接続詞とか
&amp;bold(){he/she}

&amp;bold(){verifier/attestator}
verifier   : 立証者。検証者と勘違いしそうで，そういう意味もあるらしいが，立証者。
attestator : 検証者。

***便利フレーズ
&amp;bold(){validate that A by checking that B}
Bをチェックすることで，Aであることを確認する。    </description>
    <dc:date>2014-02-24T23:25:41+09:00</dc:date>
    <utime>1393251941</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/okamo_sec/pages/30.html">
    <title>実験手順</title>
    <link>https://w.atwiki.jp/okamo_sec/pages/30.html</link>
    <description>
      *Ubuntu 12.04.3-Desktop-i386のインストール
Unetbootin を使ってインストール(CDインストールに対応していなかった．)

*TPMを使う準備
**初期の設定など
まずは，BIOS画面でTPMを有効にする．
#highlight(){
$ apt-get install trousers tpm-tools libtspi-dev
$ tpm_takeownership -z
$ tpm_setenable -e 
$ tpm_setactive
/*ここまででtpmをアクティブにできました．以下は適当にテストをするくらい．*/
$ tpm_getpubek  
}

**Trusted-GRUB
&amp;bold(){GRUB2-&gt;GRUB Legacy}
Trusted-GRUBはGRUB2に対応していないのでGRUB Legacyへ変更する．
#highlight(){
$ mv /boot/grub /boot/grub2  /*これを消したらミスってgrub rescue出てきたときにめちゃこまる！！*/
$ apt-get remove grub-pc
$ mkdir /boot/grub
$ apt-get install grub
$ update-grub
$ grub-install /dev/sda1 &lt;=環境によって異なる. }
これだけだとちゃんと起動しなかったので
#highlight(){ ．
$ sudo grub
 grub &gt; root (hd0,0)
 grub &gt; setup (hd0)
 grub &gt; quit 
}
でok.
&amp;bold(){起動のときに grub rescue &gt; と出てしまったら、、、}
ひとまず以下を試す．
#highlight() {
grub rescue &gt; ls
hd0 hd0,msdos1 hd0,msdos5
grub rescue &gt; ls (hd0,msdos1)/boot/grub2
 --なんか色々出てきたらおk                       --
 --出てこない場合は，lsの出力のうちどれで出るか調べる--
grub rescue &gt; set prefi    </description>
    <dc:date>2014-01-27T15:27:19+09:00</dc:date>
    <utime>1390804039</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/okamo_sec/pages/29.html">
    <title>TPMプログラミング</title>
    <link>https://w.atwiki.jp/okamo_sec/pages/29.html</link>
    <description>
      *TPMプログラミング
----

LinuxのTrousersを用いたプログラミング
日本語のサイトが少ない、英語でも適当でまとまっているサイトがないので適当にまとめます。
もう少し、俯瞰的に説明できるようになりたいですな。

**基本
&amp;bold(){TPMコンテキストの生成}
#highlight(linenumber,c){
TSS_HCONTEXT	hContext;
TSS_RESULT	result;
result = Tspi_Context_Create( &amp;hContext );
if ( result != TSS_SUCCESS )
 {
     fprintf(stderr, &quot;Tspi_Context_Create: %d\n&quot;, result);
     return result;
 }
Tspi_Context_Close( hContext );}    </description>
    <dc:date>2014-01-18T14:24:44+09:00</dc:date>
    <utime>1390022684</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/okamo_sec/pages/28.html">
    <title>TPMの使い方</title>
    <link>https://w.atwiki.jp/okamo_sec/pages/28.html</link>
    <description>
      *TPMの設定とか
----
**1.初期設定

とりあえずBIOS画面でリセットをする。
必要なツールは、追加していきます。

#highlight{
/*tpmの管理者,SRKパスワード設定*/
$tpm_takeownership -y -z  //どっちもwell-known 
 
/*tpm enable*/
$tpm_setenable -e -z

/*tpm active*/
$tpm_setactive -z
}

**[[TPMプログラミング]]    </description>
    <dc:date>2014-01-17T13:40:37+09:00</dc:date>
    <utime>1389933637</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/okamo_sec/pages/27.html">
    <title>Grub関連</title>
    <link>https://w.atwiki.jp/okamo_sec/pages/27.html</link>
    <description>
      Grubとはなんたるや？
から使い方

***GRUBとは
ブートローダー。現在はGRUB2を組み込んでるLinuxディストリが多い。
そのため、現在は通常GRUB2を用いる。
しかし、TrsutedGRUBなどはGRUB2に対応したバージョンがないためGRUB2ではなく、GRUBを使いたいことがある。

GRUBの設定ファイルであるmenu.lstは以下のように記述される。
#highlight(){
default    0
timeout    3
hiddenmenu　//grub rescueがでてきたが、hiddenmenuをコメントアウトで解決？？update,install忘れ？

title      Ubuntu, kernel 2.6.20-15-generic
root       （hd0,0）
kernel     /boot/vmlinuz-2.6.20-15-... ro quiet splash
initrd     /boot/initrd.img-2.6.20-15-generic}
defaultはデフォルトのブートするエントリの指定。これはエントリの順に0から割り振られる。
timeoutはGRUBメニューの表示時間。
hiddenmenuはGRUBメニューを表示せず、デフォルトのエントリーをブートする場合に書く。

それぞれのエントリには少なくとも、title、root、kernelが必要である。
titleはメニューない表示するタイトル。
kernelはカーネルの所在。後ろにあるro quiet splashはオプションでroはreadonly、quietはデバッグ情報の非表示、splashはスプラッシュ画面(最初にwindowsとかubuntuとか表示されるあれ)を表示する。
initrdはカーネル読み取り後に実行する初期化処理の指定。これによりGRUBからOSに制御が移る。    </description>
    <dc:date>2013-10-22T18:25:26+09:00</dc:date>
    <utime>1382433926</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/okamo_sec/pages/26.html">
    <title>git関連</title>
    <link>https://w.atwiki.jp/okamo_sec/pages/26.html</link>
    <description>
      **導入
ソースコードから入れるのも楽だが、asciidoc(1G越え)とかいれないとできないので普通に
#highlight(){
sudo apt-get install git}
**基本的な操作
#highlight(){
//レポジトリの作成
git init
//レポジトリの状態を表示
git status
//レポジトリの履歴を表示
git log}
なんかエラーでた→[[リモートリポジトリへの git push に失敗した場合 (remote rejected)&gt;http://nilfigo.hatenablog.com/entry/2013/08/09/145435]]    </description>
    <dc:date>2013-10-16T01:07:44+09:00</dc:date>
    <utime>1381853264</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/okamo_sec/pages/25.html">
    <title>仮想化</title>
    <link>https://w.atwiki.jp/okamo_sec/pages/25.html</link>
    <description>
          </description>
    <dc:date>2014-01-26T20:00:14+09:00</dc:date>
    <utime>1390734014</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/okamo_sec/pages/24.html">
    <title>Linuxサーバ構築</title>
    <link>https://w.atwiki.jp/okamo_sec/pages/24.html</link>
    <description>
      Ubuntu Server 12.04を用いたHTTPサーバ、DBサーバ、メールサーバなどの構築のための記録

**導入
&amp;bold(){ISO取得}
http://www.ubuntu.com/download/server
からUbuntu Server 12.04.3 LTSを取得。
メディアに焼くなどしてブートします。あとは指示にしたがって素直にインストール。

&amp;bold(){注意}
インストール途中でhome directoryを暗号化するかどうか、という質問がでるがこれにYesと答えると
SSHはクライアントの公開鍵の置き場所を変えるなどしないといけなくなります。

**SSHサーバ導入
KVMのコンソールが非常に使いにくいので最初のこれをインストール
#highlight(){
sudo apt-get install ssh}

**バックアップ環境構築
とりあえず、動かそうとすると後に回しそうだがこれは非常に重要。
規模が大きくなってから失ったら取り返しがつかないです。

&amp;bold(){ディスク全体フルバックアップ} [[http://www.kkaneko.com/rinkou/linux/remastersys.html]]
remastersysというプログラムを使って全体のバックアップを行います。
情報の劣化が起こるといけないので上記urlを参照してremastersysをインストールしてください。

次にcronの設定を行い毎日自動で行うが、sudoで実行するためこのままでは実行できない。
#highlight(){
sudo visudo}
でsudoerの編集を行います。
#highlight(){
# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) NOPASSWD:ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

#    </description>
    <dc:date>2013-10-15T20:52:07+09:00</dc:date>
    <utime>1381837927</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/okamo_sec/pages/23.html">
    <title>PEAR</title>
    <link>https://w.atwiki.jp/okamo_sec/pages/23.html</link>
    <description>
      [[HTTP_Request2]]    </description>
    <dc:date>2013-10-14T18:46:56+09:00</dc:date>
    <utime>1381744016</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/okamo_sec/pages/22.html">
    <title>HTTP_Request2</title>
    <link>https://w.atwiki.jp/okamo_sec/pages/22.html</link>
    <description>
      HTTPを用いた基本的な通信にはすべて対応していると思われます。
導入から    </description>
    <dc:date>2013-10-14T18:41:29+09:00</dc:date>
    <utime>1381743689</utime>
  </item>
  </rdf:RDF>
