<?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/25.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/19.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/18.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/okamo_sec/pages/20.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 prefix=(hd0,msdos1)/boot/grub2
grub rescue &gt; set root=hd0,msdos1
grub rescue &gt; insmod (hd0,msdos1)/boot/grub2/normal.mod
grub rescue &gt; normal
}
で復旧可能．その後，GRUBの導入手順が間違っていないか確認する．
***Trusted-GRUBのインストール
PCが起動してからシステムが起動するまでのハッシュ値を計測してくれます．
インストールに必要なものを最初に入れる．
#highlight(){
$ apt-get install automake autoconf
$ wget Trusted GRUB 1.1.5 (URLは適当に調べる)
$ gunzip Trusted-GRUB-1.1.5.tar.gzip
$ tar -xf Trusted-GRUB-1.1.5.tar
$ cd Trusted-GRUB-1.1.5
$ ./build_tgrub.sh
$ cd Trusted-GRUB-1.1.5
$ ./configure
$ make}
エラーがでなければok.
次にREADMEにしたがって/boot/grubの書き換えを行う．
#highlight(){
$ cp -rf /boot/grub /boot/grub_old
$ rm /boot/grub/stage*
$ rm /boot/grub/ *1_5
$ cp stage1/stage1 /boot/grub
$ cp stage2/stage2 /boot/grub
$ grub
 grub &gt; root (hd0,0)
 grub &gt; setup (hd0)
 grub &gt; quit 
}
でインストールが終了．
**Xenのインストール
ソースをいじることは今回ないので普通にインストールする．
#highlight(){
$ apt-get install xen-hypervisor-4.1-i386
$ apt-get install xen-tools virt-manager
}
rebootする．
ここから通常に動かすまでが大変っぽいのでがんばる．
&amp;bold(){virt-managerに怒られる}
設定ファイルを変更する．
#highlight(){
$ vi /etc/xen/xend-config.sxp
以下のコメントアウトを外し，xend-unix-server no -&gt; yesに変える
 #(xend-unix-server no)
 #(xend-unix-path /var/lib/xend/xend-socket)
$ service xend restart
}
でvirt-managerに怒られることはなくなった．
&amp;bold(){無線Lanがなくなる}
実験環境で無線lanを使いたいので対処する．
#highlight(){
$ sudo vi /etc/xen/xend-config.sxp
}
***Virt-install
今回VMのインストール，起動にはvirt-installを用いる．
&amp;bold(){vmの起動方法(vmは既に作成済み)}
#highlight(){
$ sudo virt-install --import --name vmname --ram 512 --vcpus 1 --disk path=/home/takuya/vm.img --force --graphics vnc,listen=0.0.0.0,port=5901 --noautoconsole
}    </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/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/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/19.html">
    <title>Linux関連</title>
    <link>https://w.atwiki.jp/okamo_sec/pages/19.html</link>
    <description>
      **[[Linuxサーバ構築]]
Ubuntu Server 12.04を用いたwebサーバ構築記
KVMで動かしてます。

**[[Grub関連]]

**ディスクイメージ作成
http://www.kkaneko.com/rinkou/linux/remastersys.html

-バックアップのために利用
-実行環境と開発環境を一発で揃えるために利用

**データベースバックアップ
http://mukaer.com/archives/2012/03/14/vpscentos/    </description>
    <dc:date>2013-10-22T17:25:24+09:00</dc:date>
    <utime>1382430324</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/18.html">
    <title>webアプリケーション開発関連</title>
    <link>https://w.atwiki.jp/okamo_sec/pages/18.html</link>
    <description>
      開発しているとよく扱うような実装がありますが、その都度独自の実装wを編み出してしまうことが多いので、そんな非効率なことをもうしないためにもTipsとして適当に載せておこうと思います。
若干セキュリティとかぶる可能性がありますが、基本的に
-Linux関連(設定とかコマンドとか)
-Apache関連(設定とか)
-PHP,JS,HTML,CSS その他必要な言語
らへんの備忘録を載せておきます。
----
[[Linux関連]]
[[git関連]]
[[PHP関連]]    </description>
    <dc:date>2013-10-16T00:43:24+09:00</dc:date>
    <utime>1381851804</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/okamo_sec/pages/20.html">
    <title>コンピュータ～仮想化</title>
    <link>https://w.atwiki.jp/okamo_sec/pages/20.html</link>
    <description>
      **はじめに
最近は、生活の色々な場面でクラウドサービスを利用する機会がふえています。一般の人ならドロップボックスやGoogle Drive、iCloudなどを利用している人も多いと思います。技術者の方は、サーバであったりストレージを手元に持たずクラウド環境を利用して管理しているのは珍しくありません。
仮想化技術はクラウド環境を実現する主だった技術です。仮想化技術は

[[仮想化]]    </description>
    <dc:date>2013-10-15T20:52:42+09:00</dc:date>
    <utime>1381837962</utime>
  </item>
  </rdf:RDF>
