2019/10/16
初心者向けCTFのWeb分野の強化法
CTFのweb分野を勉強しているものの本番でなかなか解けないと悩んでいないでしょうか?そんな悩みを持った方を対象に、私の経験からweb分野の強化法を解説します。
How to strengthen the CTF Web field for beginners !!
Although you are studying the CTF web field, are you worried that you can't solve it in production?
For those who have such problems, I will explain how to strengthen the web field based on my experience.
(study group) https://yahoo-osaka.connpass.com/event/149524/
CTF for ビギナーズのネットワーク講習で使用した資料です。
講習に使用したファイルは、以下のリンク先にあります。
https://onedrive.live.com/redir?resid=5EC2715BAF0C5F2B!10056&authkey=!ANE0wqC_trouhy0&ithint=folder%2czip
2019/10/16
初心者向けCTFのWeb分野の強化法
CTFのweb分野を勉強しているものの本番でなかなか解けないと悩んでいないでしょうか?そんな悩みを持った方を対象に、私の経験からweb分野の強化法を解説します。
How to strengthen the CTF Web field for beginners !!
Although you are studying the CTF web field, are you worried that you can't solve it in production?
For those who have such problems, I will explain how to strengthen the web field based on my experience.
(study group) https://yahoo-osaka.connpass.com/event/149524/
CTF for ビギナーズのネットワーク講習で使用した資料です。
講習に使用したファイルは、以下のリンク先にあります。
https://onedrive.live.com/redir?resid=5EC2715BAF0C5F2B!10056&authkey=!ANE0wqC_trouhy0&ithint=folder%2czip
セル生産方式におけるロボットの活用には様々な問題があるが,その一つとして 3 体以上の物体の組み立てが挙げられる.一般に,複数物体を同時に組み立てる際は,対象の部品をそれぞれロボットアームまたは治具でそれぞれ独立に保持することで組み立てを遂行すると考えられる.ただし,この方法ではロボットアームや治具を部品数と同じ数だけ必要とし,部品数が多いほどコスト面や設置スペースの関係で無駄が多くなる.この課題に対して音𣷓らは組み立て対象物に働く接触力等の解析により,治具等で固定されていない対象物が組み立て作業中に運動しにくい状態となる条件を求めた.すなわち,環境中の非把持対象物のロバスト性を考慮して,組み立て作業条件を検討している.本研究ではこの方策に基づいて,複数物体の組み立て作業を単腕マニピュレータで実行することを目的とする.このとき,対象物のロバスト性を考慮することで,仮組状態の複数物体を同時に扱う手法を提案する.作業対象としてパイプジョイントの組み立てを挙げ,簡易な道具を用いることで単腕マニピュレータで複数物体を同時に把持できることを示す.さらに,作業成功率の向上のために RGB-D カメラを用いた物体の位置検出に基づくロボット制御及び動作計画を実装する.
This paper discusses assembly operations using a single manipulator and a parallel gripper to simultaneously
grasp multiple objects and hold the group of temporarily assembled objects. Multiple robots and jigs generally operate
assembly tasks by constraining the target objects mechanically or geometrically to prevent them from moving. It is
necessary to analyze the physical interaction between the objects for such constraints to achieve the tasks with a single
gripper. In this paper, we focus on assembling pipe joints as an example and discuss constraining the motion of the
objects. Our demonstration shows that a simple tool can facilitate holding multiple objects with a single gripper.
【DLゼミ】XFeat: Accelerated Features for Lightweight Image Matchingharmonylab
公開URL:https://arxiv.org/pdf/2404.19174
出典:Guilherme Potje, Felipe Cadar, Andre Araujo, Renato Martins, Erickson R. ascimento: XFeat: Accelerated Features for Lightweight Image Matching, Proceedings of the 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) (2023)
概要:リソース効率に優れた特徴点マッチングのための軽量なアーキテクチャ「XFeat(Accelerated Features)」を提案します。手法は、局所的な特徴点の検出、抽出、マッチングのための畳み込みニューラルネットワークの基本的な設計を再検討します。特に、リソースが限られたデバイス向けに迅速かつ堅牢なアルゴリズムが必要とされるため、解像度を可能な限り高く保ちながら、ネットワークのチャネル数を制限します。さらに、スパース下でのマッチングを選択できる設計となっており、ナビゲーションやARなどのアプリケーションに適しています。XFeatは、高速かつ同等以上の精度を実現し、一般的なラップトップのCPU上でリアルタイムで動作します。
40. HPACKエンコーディング種類
種類 Indexed Header
Field
Representation
Literal Header Field Representation Dynamic Table
Size UpdateLiteral Header
Field with
Incremental
Indexing
Literal Header
Field without
Indexing
Literal Header
Field Never
Indexed
最初の1バイト 1XXXXXXX 01XXXXXX 0000XXXX 0001XXXX 001XXXXX
ヘッダテーブル
中のエントリを
参照する方式
ヘッダテーブ
ルにエントリ
を追加する方
式
ヘッダテーブル
にエントリを追
加しない方式
ヘッダテーブル
にエントリを追
加しない方式
Proxy先にも強
要させる
ヘッダテーブル
のサイズ変更
番号だけ 文字も送る 制御用
41. Header Table
index header name header value
1 :authority
2 :method GET
3 :method POST
4 :path /
5 :path /index.html
…
60 via
61 www-authenticate
62 name2 value2
63 name1 value2
…
…
Static Table(変わらない)
Literal Header Field with Incremental
Indexing はここにエントリーを追加
Dynamic Table(追加される)
ヘッダテーブルサイズ
初期値:4096バイト
エントリー追加でサイ
ズ超過したら最後のエ
ントリーを取り除く
Indexed Header
Field Representationはこの
index番号だけを参照して
ヘッダ情報を伝える。
Literal Header Fieldでnameだけがテーブル
に存在するものは、index番号を参照する。
42. HPACKはビットの世界
0 1 X X X X X
X X X X X X X
X X X X X X X
ヘッダビット(1~4bits)
種類によって変わる 中途半端なオフセットから始まるこ
こに任意のサイズの整数値や文字列
などのヘッダ情報を無駄なく入れ込
むにはどうしたらよいだろうか?
整数値の入れ込み方: Integer Representation
文字列の入れ込み方: String Literal Representation
49. Root
0
1
0
0 1
1
0
0
0 1
1
2 a
!
0
s t
0
c e
1
i o
1
1
0
%
1
- .
0
/ 3
1
4 5
0
0
6 7
1
8 9
1
0
0 1
1
0
1
0 1
0
= A
1
_ b
0
0
d f
1
g h
1
0
l m
1
n p
0
0
r u
1
1
0
: B
1
C D
1
1
1
0
0
0
0
0
1
1
10
#
HPACKのHuffman木
50. Hello!のHuffman符号化
文字 符号 符号長
! 1111111000 10
H 1100011 7
e 00101 5
l 101000 6
o 00111 5
H e l l o ! EOS
1100011 00101 101000 101000 00111 1111111000 1
40 bits
40/48=83.3 約17%削減
51. 演習: Huffman符号化
• abc をハフマン符号でエンコードしてHex文字列で出力する。
• 0x21231f をハフマン符号デコードしてみる。
文字 ascii 符号 符号長
a 0x61 00011 5
b 0x62 100011 6
c 0x63 00100 5
53. Indexed Header Field Representation
0 1 2 3 4 5 6 7
1 Index (7-bit prefix)
Header Table
index name value
1 … …
2 … …
3 … …
… … …
… … …
Header Tableの indexの
name value 両方をその
まま使う
54. Literal Header Field with Incremental
Indexing
0 1 2 3 4 5 6 7
0 1 Index (6-bit prefix)
H Value Length (7-bit prefix)
Value Data
0 1 2 3 4 5 6 7
0 1 0
H Name Length (7-bit prefix)
Name Data
H Value Length (7-bit prefix)
Value Data
Header Table
index name value
1 … …
2 … …
3 … …
… … …
… … …
61 … …
62 … …
63 … …
… … …
Indexed Name
New Name
Header Tableの indexの
nameだけ使う。
ここで使われた name,
valueを62番目に挿入す
る。
55. Literal Header Field without Indexing
0 1 2 3 4 5 6 7
0 0 0 0 Index (4-bit prefix)
H Value Length (7-bit prefix)
Value Data
0 1 2 3 4 5 6 7
0 0 0 0 0
H Name Length (7-bit prefix)
Name Data
H Value Length (7-bit prefix)
Value Data
Header Table
index name value
1 … …
2 … …
3 … …
… … …
… … …
Indexed Name
New Name
Header Tableの indexの
nameだけ使う。
Header Tableの変更はなし
56. Literal Header Field Never Indexed
0 1 2 3 4 5 6 7
0 0 0 1 Index (4-bit prefix)
H Value Length (7-bit prefix)
Value Data
0 1 2 3 4 5 6 7
0 0 0 1 0
H Name Length (7-bit prefix)
Name Data
H Value Length (7-bit prefix)
Value Data
Header Table
index name value
1 … …
2 … …
3 … …
… … …
… … …
Indexed Name
New Name
Header Tableの変更はなし
Header Tableの indexの
nameだけ使う。
57. without IndexingとNever Indexed
• HPACKではCRIME攻撃が困難になったが完全に防げるわけではない。
• なぜならHeaderTableへのindex化によって圧縮サイズが変わり、その
情報を手掛かりに機密データの推測が理論的に可能となる。
• セキュリティ的に機密度の高いデータ(パスワード・クッキー情報)
は、ヘッダテーブルにインデックスしないことを明示的に示すため
Never Indexedが設けられた。途中でもProxyでも方式変更を禁止する。
Proxy
Never Indexed (機密的に重要)
途中で方式を変えちゃいけない
without Indexing with indexing
変えてもOK
59. 演習: HPACK
Indexed Representation
Header Table
index header name header value
1 :authority
2 :method GET
4 :path /
7 :scheme https
• 以下の3つのヘッダをIndexed Representationでエンコードし
てhex文字列で出力しなさい。
• [{name: ':method', value: 'GET'}, {name: ':path', value: '/'}, {name:
':scheme', value: 'https'}]
60. 演習: HPACK
Literal Header Field without Indexing
• [{name: ':authority', value: 'http2.koulayer.com'}] をLiteral Header
Field without Indexing(Indexed Name)でエンコードし、hex文字
列で出力しなさい。(Huffman符号化しなくてもよい)
Header Table
index header name header value
1 :authority
2 :method GET
4 :path /
7 :scheme https
65. TCPの問題点
• TCP Head of Line Blocking.
• 3方向ハンドシェイクのコスト.
• initcwnd(初期輻輳ウィンドウ)が小さくスロースタート
• パケットロスによる大きなバックオフ(待ち時間)
• カーネルのソケットバッファの増大
• NATのタイムアウトとIPのローミング
• 経路途中のTCP Buffer Bloat
TCP Fast
Open
initCWND10
TCP cubic
Random packet
drop in router
TCP_NOT_SENT_LOWAT
解決策は提示されているが、OSや中継機の機能追加が必要
これは非常に時間がかかる。