security applica ons of gpus
play

Security Applica.ons of GPUs So.ris Ioannidis Founda.on - PowerPoint PPT Presentation

Security Applica.ons of GPUs So.ris Ioannidis Founda.on for Research and Technology Hellas (FORTH) Outline Background and mo-va-on GPU-based,


  1. Security ¡Applica.ons ¡of ¡GPUs ¡ So.ris ¡Ioannidis ¡ Founda.on ¡for ¡Research ¡and ¡ Technology ¡– ¡Hellas ¡(FORTH) ¡

  2. Outline ¡ • Background ¡and ¡mo-va-on ¡ • GPU-­‑based, ¡signature-­‑based ¡malware ¡detec.on ¡ – Network ¡intrusion ¡detec.on/preven.on ¡ – Virus ¡scanning ¡ • GPU-­‑assisted ¡malware ¡ – Code-­‑armoring ¡techniques ¡ – Keylogger ¡ • GPU ¡as ¡a ¡secure ¡crypto-­‑processor ¡ • Conclusions ¡ 24/10/14 ¡ CANS ¡2014 ¡ 2 ¡

  3. GPU ¡= ¡Graphics ¡Processing ¡Unit ¡ • The ¡heart ¡of ¡graphics ¡cards ¡ • Mainly ¡used ¡for ¡real-­‑.me ¡3D ¡game ¡rendering ¡ – Massively ¡parallel ¡processing ¡capacity ¡ 24/10/14 ¡ CANS ¡2014 ¡ 3 ¡

  4. Why ¡GPU? ¡ • General-­‑purpose ¡compu.ng ¡ – Flexible ¡and ¡programmable ¡ – Portability ¡ • Powerful, ¡ubiquitous, ¡affordable ¡ – Dominant ¡co-­‑processor ¡ – Constant ¡innova.on ¡ – Inexpensive ¡and ¡always-­‑present ¡ • Data-­‑parallel ¡model ¡ 24/10/14 ¡ CANS ¡2014 ¡ 4 ¡

  5. CPU ¡vs. ¡GPU ¡ CPU ¡ GPU ¡ Xeon X5550: GTX480: 4 cores 480 cores 731M transistors 3,200M transistors 24/10/14 ¡ CANS ¡2014 ¡ 5 ¡

  6. S ingle ¡ I nstruc.on, ¡ M ul.ple ¡ T hreads ¡ • Example: ¡vector ¡addi.on ¡ CPU ¡code ¡ void vecadd( � int *A, int *B, int *C, int N) � { � int i; � //iterate over N elements � for (i=0; i<N; ++i) � C[i] = A[i] + B[i]; � } � � vecadd(A, B, C, N); � � 24/10/14 ¡ CANS ¡2014 ¡ 6 ¡

  7. S ingle ¡ I nstruc.on, ¡ M ul.ple ¡ T hreads ¡ • Example: ¡vector ¡addi.on ¡ CPU ¡code ¡ GPU ¡code ¡ void vecadd( � __global__ void vecadd( � int *A, int *B, int *C, int N) � int *A, int *B, int *C) � { � { � int i; � int i = threadIdx.x; � //iterate over N elements � C[i] = A[i] + B[i]; � for (i=0; i<N; ++i) � } � C[i] = A[i] + B[i]; � � } � � � //Launch N threads � vecadd(A, B, C, N); � vecadd<<<1, N>>>(A, B, C); � � � 24/10/14 ¡ CANS ¡2014 ¡ 7 ¡

  8. S ingle ¡ I nstruc.on, ¡ M ul.ple ¡ T hreads ¡ • Example: ¡vector ¡addi.on ¡ CPU ¡code ¡ GPU ¡code ¡ void vecadd( � __global__ void vecadd( � int *A, int *B, int *C, int N) � int *A, int *B, int *C) � { � { � int i; � int i = threadIdx.x; � //iterate over N elements � C[i] = A[i] + B[i]; � for (i=0; i<N; ++i) � } � C[i] = A[i] + B[i]; � � } � � � //Launch N threads � vecadd(A, B, C, N); � vecadd<<<1, N>>>(A, B, C); � � � 24/10/14 ¡ CANS ¡2014 ¡ 8 ¡

  9. S ingle ¡ I nstruc.on, ¡ M ul.ple ¡ T hreads ¡ SIMT ¡group ¡ (warp) ¡ • Threads ¡within ¡the ¡same ¡ warp ¡have ¡to ¡execute ¡ the ¡same ¡instruc.ons ¡ • Great ¡for ¡regular ¡computa/ons! ¡ 24/10/14 ¡ CANS ¡2014 ¡ 9 ¡

  10. Outline ¡ • Background ¡and ¡mo.va.on ¡ • GPU-­‑based, ¡signature-­‑based ¡malware ¡detec-on ¡ – Network ¡intrusion ¡detec-on/preven-on ¡ – Virus ¡scanning ¡ • GPU-­‑assisted ¡malware ¡ – Code-­‑armoring ¡techniques ¡ – Keylogger ¡ • GPU ¡as ¡a ¡secure ¡crypto-­‑processor ¡ • Conclusions ¡ 24/10/14 ¡ CANS ¡2014 ¡ 10 ¡

  11. Signature-­‑based ¡Detec.on ¡ • Typically ¡deployed ¡at ¡ingress/egress ¡points ¡ – Inspect ¡ all ¡network ¡traffic ¡ – Look ¡for ¡suspicious ¡ac.vi.es ¡ – Alert ¡on ¡malicious ¡ac.ons ¡ 10 ¡GbE ¡ Internal ¡ Internet ¡ Network ¡ NIDS ¡ 24/10/14 ¡ CANS ¡2014 ¡ 11 ¡

  12. Challenges ¡(1) ¡ • Traffic ¡rates ¡ are ¡increasing ¡ – 10 ¡Gbit/s ¡Ethernet ¡speeds ¡are ¡common ¡in ¡metro/ enterprise ¡networks ¡ – More ¡than ¡40 ¡Gbit/s ¡at ¡the ¡core ¡ 24/10/14 ¡ CANS ¡2014 ¡ 12 ¡

  13. Challenges ¡(2) ¡ • Ever-­‑increasing ¡need ¡to ¡perform ¡ more ¡ complex ¡analysis ¡ at ¡ higher ¡traffic ¡rates ¡ – Deep ¡packet ¡inspec.on ¡ – Stateful ¡analysis ¡ – 1000s ¡of ¡afack ¡signatures ¡ PaNern ¡Matching ¡ Protocol ¡Analysis ¡ Stream ¡Demux ¡ Reassembly ¡ TCP ¡Stream ¡ Output ¡ 24/10/14 ¡ CANS ¡2014 ¡ 13 ¡

  14. Designing ¡NIDS ¡and ¡AVs ¡ • Fast ¡ – Need ¡to ¡handle ¡many ¡Gbit/s ¡ – Scalable ¡ • The ¡future ¡is ¡ many-­‑core ¡ • Commodity ¡hardware ¡ – Cheap ¡ – Easily ¡programmable ¡ 24/10/14 ¡ CANS ¡2014 ¡ 14 ¡

  15. Today: ¡fast ¡ or ¡commodity ¡ IDS/IPS ¡Sensors ¡ ¡ • Fast ¡“hardware” ¡IDS/IPS ¡ (10s ¡of ¡Gbps) ¡ – FPGA/TCAM/ASIC ¡based ¡ ~ ¡US$ ¡20,000 ¡-­‑ ¡60,000 ¡ ¡ – Usually, ¡.ed ¡to ¡a ¡specific ¡ implementa.on ¡ IDS/IPS ¡M8000 ¡ (10s ¡of ¡Gbps) ¡ – Throughput: ¡High ¡ ¡ ~ ¡US$ ¡10,000 ¡-­‑ ¡24,000 ¡ • Commodity ¡“sojware” ¡ NIDS/NIPS ¡and ¡AVs ¡ – Processing ¡by ¡general-­‑ Open-­‑source ¡S/W ¡ purpose ¡processors ¡ ≤ ¡~1 ¡Gbps ¡ ¡ – Throughput: ¡Low ¡ 24/10/14 ¡ CANS ¡2014 ¡ 15 ¡

  16. Typical ¡Signature-­‑based ¡NIDS ¡ Architecture ¡ ¡ ¡ ¡ alert tcp $EXTERNAL_NET any -> $HTTP_SERVERS 80 ( msg:“possible attack attempt BACKDOOR optix runtime detection"; content:"/whitepages/page_me/ 100.html"; pcre:"/body=\x2521\x2521\x2521Optix\s+Pro\s+v\d+\x252E\d+\S+sErver\s+Online \x2521\x2521\x2521/" ) Packet ¡ Multi-­‑string ¡ Match ¡ Rule ¡Options ¡ Evaluation ¡ Output ¡ Preprocessing ¡ Success ¡ Success ¡ Acquisition Pattern ¡Matching ¡ Evaluation ¡ ¡ ¡ ¡ Decode ¡ Match ¡Failure ¡ Evaluation ¡Failure ¡ Malicious ¡ Flow ¡management ¡ ¡ (Innocent ¡Flow) ¡ (Innocent ¡Flow) ¡ Flow ¡ Reassembly ¡ Bottlenecks ¡ * ¡PCRE: ¡Perl ¡Compatible ¡Regular ¡Expression ¡ ¡ 16 ¡

  17. Single-­‑threaded ¡NIDS ¡performance ¡ Pafern ¡ NIC ¡ Preprocess ¡ Output ¡ matching ¡ • Vanilla ¡Snort: ¡0.2 ¡Gbit/s ¡ 24/10/14 ¡ CANS ¡2014 ¡ 17 ¡

  18. Problem ¡#1: ¡Scalability ¡ • Single-­‑threaded ¡NIDS ¡have ¡limited ¡ performance ¡ – Do ¡not ¡scale ¡with ¡the ¡number ¡of ¡CPU ¡cores ¡ 24/10/14 ¡ CANS ¡2014 ¡ 18 ¡

  19. Mul.-­‑threaded ¡performance ¡ Pafern ¡ Preprocess ¡ Output ¡ matching ¡ Pafern ¡ NIC ¡ Preprocess ¡ Output ¡ matching ¡ Pafern ¡ Preprocess ¡ Output ¡ matching ¡ • Vanilla ¡Snort: ¡0.2 ¡Gbit/s ¡ • With ¡mul-ple ¡CPU-­‑cores: ¡0.9 ¡Gbit/s ¡ 24/10/14 ¡ CANS ¡2014 ¡ 19 ¡

  20. Problem ¡#2: ¡How ¡to ¡split ¡traffic ¡ cores ¡ û Synchroniza.on ¡overheads ¡ NIC ¡ ¡ û Cache ¡misses ¡ ü Receive-­‑Side ¡Scaling ¡(RSS) ¡ ¡ 24/10/14 ¡ CANS ¡2014 ¡ 20 ¡

  21. Mul.-­‑queue ¡performance ¡ Pafern ¡ Preprocess ¡ Output ¡ matching ¡ RSS ¡ Pafern ¡ Preprocess ¡ Output ¡ NIC ¡ matching ¡ Pafern ¡ Preprocess ¡ Output ¡ matching ¡ • Vanilla ¡Snort: ¡0.2 ¡Gbit/s ¡ • With ¡mul.ple ¡CPU-­‑cores: ¡0.9 ¡Gbit/s ¡ • With ¡mul-ple ¡Rx-­‑queues: ¡1.1 ¡Gbit/s ¡ 24/10/14 ¡ CANS ¡2014 ¡ 21 ¡

  22. Problem ¡#3: ¡Pafern ¡matching ¡is ¡the ¡ bofleneck ¡ > ¡75% ¡ Pafern ¡ NIC ¡ Preprocess ¡ Output ¡ matching ¡ • On ¡an ¡Intel ¡Xeon ¡X5520, ¡2.27 ¡GHz, ¡8 ¡MB ¡L3 ¡Cache ¡ – String ¡matching ¡analyzing ¡bandwidth ¡per ¡core: ¡ 1.1 ¡Gbps ¡ – PCRE ¡ ¡analyzing ¡bandwidth ¡per ¡core: ¡0.52 ¡Gbps ¡ ¡ 24/10/14 ¡ CANS ¡2014 ¡ 22 ¡

  23. Offload ¡pafern ¡matching ¡on ¡the ¡GPU ¡ Pafern ¡ NIC ¡ Preprocess ¡ Output ¡ matching ¡ strings ¡ pcre ¡ 24/10/14 ¡ CANS ¡2014 ¡ 23 ¡

  24. Pafern ¡matching ¡on ¡the ¡GPU ¡ ¡Both ¡ string ¡searching ¡ and ¡ regular ¡expression ¡ matching ¡can ¡be ¡matched ¡efficiently ¡by ¡combining ¡ the ¡paferns ¡into ¡ Determinis/c ¡Finite ¡Automata ¡ (DFA) ¡ 24/10/14 ¡ CANS ¡2014 ¡ 24 ¡

  25. Pafern ¡matching ¡on ¡the ¡GPU ¡ Packet ¡Buffer ¡ GPU ¡ GPU ¡ GPU ¡ core ¡ core ¡ core ¡ GPU ¡ GPU ¡ GPU ¡ core ¡ core ¡ core ¡ Matches ¡ • Uniformly ¡one ¡core ¡for ¡each ¡reassembled ¡packet ¡stream ¡ 24/10/14 ¡ CANS ¡2014 ¡ 25 ¡

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend