Stand on the shoulders of giants

[paper review] Triplet Fingerprinting 본문

Paper reviews

[paper review] Triplet Fingerprinting

finallyupper 2024. 1. 21. 23:55

Keys

  • NSL with triplet networks
  • 새로 수집한 데이터 바로 모델학습에 사용가능/ 적은자원만으로도(weak adversary) WF 가능 [Threat landscape]

Abstract & introduction

  • 기존것의 한계
  1. DF = 큰 데이터셋을 요구받음, 꾸준히 update해야함
  2. 대부분의 가정
    • train/test data가 비슷한 distribution을 갖는다.
    • train/test data가 “같은 시간”에 “같은 type”의 network condition에서 수집되었다.
    • 공격자는 weak attacker model (realistic condition에 맞는)

Background

  • Bootstrap time = 시스템 초기화 및 가동 과정이 완료되는 데 소요되는 시간
  • (논문) ready-to-use classifier가될때까지 attacker에게 필요한 총시
  • N-shot learning = NSL
  • TLS connection = HTTPS를 암호화해주는 프로토
  • protocol = 컴퓨터 내부에서, 또는 컴퓨터 사이에서 데이터의 교환 방식을 정의하는 규칙 체계
    • ex. https, http(웹), TCP/IP (인터넷), SMTP(Simple Mail Transfer protocol, 이메일)
  • gateway = 하나의 네트워크를 벗어나 다른 네트워크에 접속하는 장비를 게이트웨이라고 부른다. 무선 네트워크를 유선 네트워크에 연결시켜 주는 유무선 인터넷 공유기도 넓게 보면 게이트웨이이며 또한 라우터이다.
  • stale ~= changing
  • Keras는 API고 Tensorflow는 framework

WF Attack Assumption

1) Closed vs Open world Scenario

  • size of open world
    • unmonitored websites을 증가시키면서 모델 성능을 비교 평가했음
    • 그런데 사실상 victim이 방문할 수있는 가짓수 >>> 수집량
  • open-world evaluation model
    1. standard model = training data에 unmonitored set 포함 o
    2. AWF model = training data에 unmonitored set 포함 x,대신 cross-entropy loss 구해서 confidence threshold 기반으로 판정함.

2) Users’ Browsing Behaviour

  • Tor clients가 specific behavior를 따름을 가정함
    • browse sites sequentially
    • use only single tab at a time
    → multi-tab browsing 고려 시작(논문에서는 고려x)

3) Traffic Parsing and Background traffic

  • attacker은 site에서 만들어진 모든 traffic을 수집하고, 또 traffic들을 distinguish할 수 있다고 가정함.
  • client와 guardnode ⇒ all Tor tracffic iz multiplexed in TLS connection

Attacker Goal

* 경시되었던 elements of WF attacks

  1. Generalizability
    • attacker가 victim과 same condition에서 classifier을 학습시킴
    ex. network conditions, TBB version, settings⇒ data mismatch에 robust하게 만들자(staleness of trainingset, heterogeneous dist of tr,te data)                                                                                                                                    → similar machines, same nw condition기반 crawling → perf 📉
  2. Bootstrap time
    • assumption
      • train, test → same distributioln
      • real : time gap 존재 → mismatch → re-train 필요
    The longer the time used to collect the new data, the higher the chance that the dataset will be stale by the time the attack is deployed …⇒ 이전 학습시킨 데이터가 나중에 수집한 데이터를 쓸때에도 효과적인 상태여야함.                  ⇒ Our model, on the other hand, can use a years-old dataset to build the pre-trained model
  3. Flexibility & Tranferability
    • 일반적은 train, pred절차는 k monitored sites, T training instances for each monitored sites, U training instances for the unmonitored set이라고 할 때 k*T + U로 train하고 predict
    • 문제점 = constraint 존재 → k개 websites만이 predicted class후보군임 → re-train 필연적
    • 해결책 = N-shot learning, transfer learning
    ⇒ 새로운 site들을 추가하는 것이 flexible해야함
  4. Attack performance ⇒ 높은 성능은 유지

N-shot Learning(NSL) Technique

  • 극소량의 데이터를 가지고 빠르게 모델을 학습시키자
  • N examples per class
  • 기존
    • large dataset
    • similar distribution in train, test

Triplet Network

 

  • triplets (input) → 각각을 sub-network에 통과시킴.   
    1. Anchor(A)
    2. Positive(P) : A와 같은 class
    3. Negative(N) : ≠ A의 class
  • 이중에 하나만 가져오는데 그 선택 과정이나 근거나 하나만 가져오는 이유 이런거 설명..x (궁금점)
    same website와의 distance(D)는 minimize, diff와는 maximize (~ contrastive learning)

Hyperparameter tunings

  • base model
  • distance metrics
    • cosine distance (> Euclidean distance)
  • mining strategy→ sol : Hard negative examples 사용
    • strategies
    • Random, Hard-Negative, Semi-Hard-Negative
  • ( - ) 대부분의 negative examples N은 A와 too far

TF Attack Implementation

1. pre-training

fine-tuning hyperparmeters 및 sub-network으로 DF model사용

(softmax를 new FC layer로 대체)

2. Attack

2-1. N-training

  1. N-shot맞게 데이터 수집
  2. pre-training으로 얻은 모델(feature extractor)에 해당 샘플들 통과시켜 embedded vectors를 각 site마다 얻음
  3. 그 embedded vector들을 k-NN(SVM, MLP등)를 train시킴.

2-2. Classification

Experiments

  • dataset
    • Wang
    • AWF
    • DF
  • timestamp & packet size 무시, direction only
  • Similar but mutually exclusive datasets
    • experimental settings
    • N-ALL vs N-MEV (representation)
      • N-ALL : k-NN을 N-train할때 N embedded samples사용
      • N-MEV : k-NN을 N-train할때 mean of all N examples 시행(1
      • ⇒ MEV(Mean Embedded Vector)
    • results즉, 동일 class의 vector들을 average하다보니 embedded vector간의 noise를 reduce할 수 있었음.
    • : N-MEV가 attack 정확도 더 높았음
    • TF Goals
    • overlaps btw pre-training and attack phases→ 오히려 overfitting & more rigid model
    • → NSL with triplet networks 사용시 input들의 pair을 differentiate할 수 있어 효과적인 sample 학습이 가능함. (low traffic settings에서도 고성능, ↔ CUMUL, k-FP)
    • → pre-training과 attack에 같은 class의 sample들을 포함하는것은 딱히 attack성능 향상에 도움이 안되었음.
  • WF attacks with different data distributions
    • experimental settings
      • feature extraction = AWF775
      • N-train = Wang100 → 둘이 아주 다름을 부록A에서 입증
    • results
      • 5-shot = 85%
    • TF Goals
      • feature extract dist ≠ attack
  • pre-training, classification datsets가 다른 시점, 다른 TBB에서 구축됨(→diff distributions)
  • Transfer Learning vs Triplet Networks
    • N total layers에서 앞의 k개 layer들을 freezing후 re-train the model
    • → 마지막 FC layer 제외 모두 freeze할때 가장 성능이 좋았음.
    • results
      • case 1)N-shot에서 N이 작을땐 확실히 TF > Transfer learning(=Traditional)
      • case 2) TF >> “ 
        • 원인 분석
          • Transfer learning은 fine-tuning할 수 있는 layer들이 별로 없다는 점..but
          • TF는 feature extraction에서 모든 depth를 고려하니까.
  • Open-world Scenario
    • monitored / unmonitored sites 구분
    • precision/ recall metrics 사용해서 평가
    • experimental setting
      • case1) mon=AWF100, unmon=AWF9000
      • case2) mon=Wang100, unmon=AWF9000
    • results
    • ⇒ 두 settings에서 모두 effective (dist가 다를때 오히려 더 잘나왔음?!) ↔closed
      • closed/open 결과의 비일관성의 원인
      • = 많은 monitored sites가 unique content여서..(closed-world에서 하나하나 다 분류해내는게 mon/unmon 구분하는것보다 어려웠기때문이지 않을까)
  • TF attack in the Larger Open World
    • AWF400K = 현존 unmonitored 데이터셋중 가장 큰거
    • Result = dataset이 커질수록 성능이 줄었음.
  • TF attack against WTF-PAD
    • experimental setting
      • WTF-PAD로 defended traces simulate
      *AWF dataset에는 packet정보 뿐이라 못씀… → DF95사용
    • results
      • 두 case모두 non-defended dataset일때보다 defended일때 attacks의 정확도급감 👎

Appendix A: Dataset’s distribution analysis (B,C는 생략)

1. Basic network traffic statistic

- # of incoming/outcoming packets

- # of incoming/outcoming bursts 

=> Wang & AWF dataset의 공통 sites에서 얘네들의 변화가 컸음.

2. Similarity measurement

  • Cosine distance
    • intrasimilarity = 내부 동일 website간
    • intersimilarity = Wang과 AWF의 동일 website간
    ⇒ intersimilarity 작음 == 다른 데이터셋의 동일 웹사이트는 유사도가 낮음

 

TF_TripletFingerprinting_3319535.3354217.pdf
2.39MB

Highlight version of the paper

기타

  • WF자체가 웹사이트 마다 own unique pattern을 갖는다는 특징을 기반으로 만들어진 문제인데 distribution이 달라지는걸 건들여도 되는 이유

        = (추측) distribution이 feature을 모두 설명해주지 못한다(pattern과 동치가 되지 못한다)

  • 3년간 데이터를 사용하고 클래스당 5개 샘플 썼을 때 정확도 85% 달성함
  • NSL with triplet networks
  • 장점: 새로수집한 데이터 바로 모델학습에 사용가능/ 적은자원만으로도(weak adversary) WF 가능[Threat landscape]
  • 단점: protected traffic에 취약(defense 적용된 traces, ex. WTF-PAD)