SlideShare a Scribd company logo
1 of 47
Evolving Custom
Communication Protocols
        by Wes Faler of Part-Time Scientists
           for 28C3, Berlin Germany, 2011
                       wf@ptscientists.com
   Why
   What
   How
   Code and Details
   Results
   Your turn!




<presentation>
   Part-Time Scientists needed a
    communication protocol between our
    Earth stations and our rover on the moon.




Why
   Given:
    ◦ A fixed set of hardware components for a
      packet transmitter and receiver.
    ◦ Video and telemetry streams that must go
      from the moon to Earth.
    ◦ A stream of commands that must go from
      Earth to the rover on the moon.
   Create:
    ◦ A finite state machine that provides the
      network and application layer control of a
      transceiver used on both earth and the moon.



What
   Must be a published open protocol.
   Cannot use encryption.
   Long latency.
   High packet cost and value.
   Bandwidth is limited and saturated.
   May tunnel through another protocol.
   TCP/IP is not an option.




What - Complications





Easy as 1…
 Create parameterized algorithm
 One-at-time simulation




Easy as 1…2…
   Parameter sweep
int driver_movesPerTransaction[] = { 1, 20 };
int driver_wheelTicksPerCommand[] = { 512, 4096 };
int driver_commandsPerPacket[] = { 1, 25 };
int driver_moveCommandsPerCameraCommand[] = { 0, 10 };
float earth_packetTimeout[] = { 5, 30 };
int earth_maxAllowedBacklogCount[] = { 10 };
float burst_upstreamBurstErrorChance[] = { 0, 0.05 };
float burst_downstreamBurstErrorChance[] = { 0, 0.05 };
float rover_naggleDuration[] = { 0.5 };
int rover_packetQueueSize[] = { 10, 0 };
int rover_shouldFinishMoveQueueBeforeCommRecovery[] = { 1, 0 };
float rover_commRecoveryDuration[] = { 5, 30 };
float rover_moveCommandCommOutageChance[] = { 0.01, 0 };
float rover_steerCommandCommOutageChance[] = { 0.01, 0 };


Easy as 1…2…3…
   GPU

 Before: 1 simulation/second
 Port unoptimized C++ code to GPU
    ◦ Least programming effort possible
    ◦ Just for parameter sweeps
   After: 700 seconds for 5200 simulations
    ◦ 7.4 simulations/second
   Run a million simulations


Easy as 1…2…3…4.
Results – Distance Travelled
Just a few small changes…
   Given:
    ◦ A fixed set of hardware components for a packet
      transmitter and receiver.
    ◦ Video and telemetry streams that must go from the
      moon to Earth.
    ◦ A stream of commands that must go from Earth to
      the rover on the moon.
    ◦ Changing requirements from stakeholders.
   While(!Launched yet)
    ◦ Create:
      A finite state machine that provides the network and
       application layer control.




What, rev.2
http://xkcd.com/974/
              “The General Problem”



Can you pass the data?
   Given:
    ◦ A partial existing system structure
      Inputs
      Output(s)
      Formula structure
    ◦ Test cases
    ◦ Constraints
   Create:
    ◦ The optimal set of parameters
    ◦ An equation or algorithm



Invention – GP
Invention - GP
   Cartesian Genetic Programming (CGP)
    ◦   Generates equations like circuits.
    ◦   Parallelizable results.
    ◦   FPGA friendly.
    ◦   Operators for simple math and logic.
         Constant
         Add, Subtract, Negative
         Add Constant, Subtract Constant
         NOP, !, &&, ||,
         > Constant, >= Constant,== Constant
         >, >=, ==




How – CGP
   Make a random “circuit”.


                 +        &&


                 *        -


                 +        >




How – CGP
   Score the circuit.


                  +      &&


                  *      -


                  +      >    Test #1: Terrible
                              Test #2: Terrible
                              Test #3: Terrible

                              Score: Terrible*3



How – CGP
   Make random changes and rescore.


                +       +


                *       -


                +       /     Test #1: Terrible
                              Test #2: Terrible-4
                              Test #3: Terrible

                              Score: Terrible*3-4



How – CGP
   Start with 1 parent.




         500




How - CGP
 Start with 1 parent.
 Make mutant children.




      500      500




How - CGP
 Start with 1 parent.
 Make mutant children.
 Score everyone.




      500      500

               500


               725


How - CGP
 Start with 1 parent.
 Make mutant children.
 Score everyone.
 Promote the best child that isn’t worse
  than the parent.
    ◦ Must promote anything equal to the parent!

         500       500       500

                   500


                   725


How - CGP
 Start with 1 parent.
 Make mutant children.
 Score everyone.
 Promote the best child that isn’t worse
  than the parent.
    ◦ Must promote anything equal to the parent!

         500       500       500      85

                   500       85


                   725       97


How - CGP
Nc
                                   No
 Ni

                       Nr
                                   Gene
                            Operator type
                   +
                            Constant
                            Input indexes


Terminology
+     &&


          *     -


         +     >




Runtime Optimization
   Individual
   Executor and Optimizer
   Mutator
   Population
   Support
    ◦ Threadsafe, GPU-friendly random numbers
    ◦ Save, Load
    ◦ Images




Code – CGP Core
   Mission Enders
    ◦ Make rover execute attacker’s commands
    ◦ Prevent rover execution of real commands
    ◦ Prevent acceptance of video data
   High Risk
    ◦ Make mission control accept false telemetry
    ◦ Delay rover execution of real commands




How – Attacker’s Goals
   Discrete Event System simulation
    ◦ Priority queue of events ordered by time
    ◦ Set of Actors creating and handling events
 Packet is control flag array and payload
 Outer Space as random Actor
    ◦   Lose
    ◦   Replay
    ◦   Echo
    ◦   Corrupt




How – Simulation structure
   Transceiver as set of Actors
    ◦ Data Ready To Transmit
    ◦ Data Received
    ◦ Packet Expired in Transmit History
   Attacker as Actor

   Actors == Chromosomes
    ◦ Scored separately
    ◦ Promoted separately
    ◦ Combines partial solutions for next generation


How – Simulation structure
   Coevolved
   Full knowledge of packet structure
   Can crack private keys
   Sees all packets
   Cannot prevent packet delivery
    ◦ No “man in the middle” attacks
 Able to send to anyone
 Risk when transmitting




How - Attacker
 Stateful and large for complex strategy
 Single Chromosome in feedback loop
      Packet                 Packet
        In                    Out


                 Attacker
       Timer




                  State


How – Attacker Structure
   Generational fitness
   Best fitness
   Validated fitness

   Penalties/Rewards
    ◦   Accepted bad signature
    ◦   Accepted attacker packet
    ◦   Accepted unknown data
    ◦   Accepted data more than once
    ◦   Never accepted data
    ◦   Accepted data with wrong data type
    ◦   Command packet accepted successfully




How - Fitness
Validated Fitness vs. Fitness
                    700000


                    600000
                                                       R² = 0.8807
                    500000
                                               Spearman's Rank (p) = 0.9188
Validated Fitness




                    400000


                    300000


                    200000


                    100000


                        0
                             0   50000      100000      150000        200000   250000   300000   350000
                                                               Fitness




Tip – Validate Fitness
   Can the control logic be automatically created
    by Cartesian Genetic Programming (CGP)?
   If so, is the logic robust?
    ◦ Can it work with poor signal quality?
    ◦ Can it work with an attacker?
   Should the control logic be created:
    ◦ In isolation?
    ◦ Considering only poor signal quality cases?
    ◦ Considering an attacker?
   Can an attacker’s control logic be created at
    a faster pace than the network logic?



How - Questions to answer
 Experiment
 Worlds
    ◦ Data schedule
    ◦ Actors
 Execution
 Fitness
    ◦ Generational fitness
    ◦ Best fitness
    ◦ Validated fitness



Code – Simulation Core
Can CGP make control logic?
Can CGP make control logic?
 Randomize everything!
 Reduce randomness in fitness
 Threadsafe random numbers
 Incentivize
    ◦ “Mute” attackers
 Increase population size
 Dust-off your statistics books




More Tips
Population 4    Population 8
   Fitness                         2x
   Evaluations
   Run time                        3x
   Same                            Much better
   generations                     fitness
   Same run time   Equal fitness   Equal fitness




Population Size Effects
Generation fitness without an attacker
140000



120000



100000



80000                                                                                  fitness
                                                                                       bestFitness
                                                                                       validatedFitness
60000



40000



20000



    0
         0   20000   40000   60000   80000 100000 120000 140000 160000 180000 200000




Does an attacker help?
Generation fitness with an attacker
100000


90000


80000


70000


60000

                                                                                         fitness
50000
                                                                                         bestFitness

40000                                                                                    validatedFitness


30000


20000


10000


    0
         0   20000   40000   60000   80000   100000 120000 140000 160000 180000 200000



 Does an attacker help?
   Does an attacker’s presence produce a
    better transceiver?
                           No attacker   With attacker
Best fitness               18316         23208
Validated fitness          134542        137494
Active genes                             +50%
Fitness:Generation         Medium        Near Zero
correlation
Other Fitness:Generation   Medium        Medium
Val. Fitness:Gen. Slope                  2x




Does an attacker help?
   Can the control logic be automatically created
    by Cartesian Genetic Programming (CGP)?
   If so, is the logic robust?
    ◦ Can it work with poor signal quality?
    ◦ Can it work with an attacker?
   Should the control logic be created:
    ◦ In isolation?
    ◦ Considering only poor signal quality cases?
    ◦ Considering an attacker?
   Can an attacker’s control logic be created at
    a faster pace than the network logic?



Results - Questions answered
   CGP on GPU
   Worlds on GPU
   Finer-grain Chromosomes
   New “best” selection with an attacker
   Islands
   Freezing transceiver or attacker
   Attacker detection and countermeasures




Future
   Danke!

   <shameless recruiting ad>
    ◦Join us at ptscientists.com!
   </shameless recruiting ad>

   Wes Faler of Part-Time Scientists
    ◦ wf@ptscientists.com




</presentation>
   Code and presentation
    ◦ http://wp.me/pGgFl-V
   Julian Miller (inventor of CGP)
    ◦ http://sites.google.com/site/julianfrancismiller/prof
      essional
   “Cartesian Genetic Programming” book
    ◦ http://www.springer.com/computer/theoretical+co
      mputer+science/book/978-3-642-17309-7
   “Evolved to Win” e-book
    ◦ http://www.moshesipper.com/etw/
   “Communication Protocol Engineering” book
    by Miroslav Popovic



Resources

More Related Content

Viewers also liked

Numbers1 wordsearch
Numbers1 wordsearchNumbers1 wordsearch
Numbers1 wordsearchyeepchin268
 
Ольга Мугатина. Маркетинг территории как инструмент повышения привлекательн...
Ольга Мугатина.  Маркетинг территории как инструмент  повышения привлекательн...Ольга Мугатина.  Маркетинг территории как инструмент  повышения привлекательн...
Ольга Мугатина. Маркетинг территории как инструмент повышения привлекательн...brandhouseru
 
Prinsip prinsip pendidikan islam perspektif al-quran dan hadis
Prinsip prinsip pendidikan islam perspektif al-quran dan hadisPrinsip prinsip pendidikan islam perspektif al-quran dan hadis
Prinsip prinsip pendidikan islam perspektif al-quran dan hadisAchmad Arifudin
 
Яна Алексеева. Маркетинг территорий: региональные кейсы и ошибки.
Яна Алексеева. Маркетинг территорий: региональные кейсы и ошибки.Яна Алексеева. Маркетинг территорий: региональные кейсы и ошибки.
Яна Алексеева. Маркетинг территорий: региональные кейсы и ошибки.brandhouseru
 
Elizamar[1] Power Point Presentation
Elizamar[1] Power Point PresentationElizamar[1] Power Point Presentation
Elizamar[1] Power Point PresentationElizamard
 
Katamaran ng mga pilipino
Katamaran ng mga pilipinoKatamaran ng mga pilipino
Katamaran ng mga pilipinoFrans Sarmiento
 
TFE. Conception et réalisation d'une application web mobile touristique. Marg...
TFE. Conception et réalisation d'une application web mobile touristique. Marg...TFE. Conception et réalisation d'une application web mobile touristique. Marg...
TFE. Conception et réalisation d'une application web mobile touristique. Marg...Jonathan Margrève
 
xAPI - web-conférence FFFOD du 15/09/15
xAPI - web-conférence FFFOD du 15/09/15xAPI - web-conférence FFFOD du 15/09/15
xAPI - web-conférence FFFOD du 15/09/15FFFOD
 
Contenus De Marque Et Storytelling Court
Contenus De Marque Et Storytelling CourtContenus De Marque Et Storytelling Court
Contenus De Marque Et Storytelling CourtThe Roxane Company
 

Viewers also liked (10)

Numbers1 wordsearch
Numbers1 wordsearchNumbers1 wordsearch
Numbers1 wordsearch
 
Ольга Мугатина. Маркетинг территории как инструмент повышения привлекательн...
Ольга Мугатина.  Маркетинг территории как инструмент  повышения привлекательн...Ольга Мугатина.  Маркетинг территории как инструмент  повышения привлекательн...
Ольга Мугатина. Маркетинг территории как инструмент повышения привлекательн...
 
Prinsip prinsip pendidikan islam perspektif al-quran dan hadis
Prinsip prinsip pendidikan islam perspektif al-quran dan hadisPrinsip prinsip pendidikan islam perspektif al-quran dan hadis
Prinsip prinsip pendidikan islam perspektif al-quran dan hadis
 
Яна Алексеева. Маркетинг территорий: региональные кейсы и ошибки.
Яна Алексеева. Маркетинг территорий: региональные кейсы и ошибки.Яна Алексеева. Маркетинг территорий: региональные кейсы и ошибки.
Яна Алексеева. Маркетинг территорий: региональные кейсы и ошибки.
 
Elizamar[1] Power Point Presentation
Elizamar[1] Power Point PresentationElizamar[1] Power Point Presentation
Elizamar[1] Power Point Presentation
 
Ppt rizal
Ppt rizalPpt rizal
Ppt rizal
 
Katamaran ng mga pilipino
Katamaran ng mga pilipinoKatamaran ng mga pilipino
Katamaran ng mga pilipino
 
TFE. Conception et réalisation d'une application web mobile touristique. Marg...
TFE. Conception et réalisation d'une application web mobile touristique. Marg...TFE. Conception et réalisation d'une application web mobile touristique. Marg...
TFE. Conception et réalisation d'une application web mobile touristique. Marg...
 
xAPI - web-conférence FFFOD du 15/09/15
xAPI - web-conférence FFFOD du 15/09/15xAPI - web-conférence FFFOD du 15/09/15
xAPI - web-conférence FFFOD du 15/09/15
 
Contenus De Marque Et Storytelling Court
Contenus De Marque Et Storytelling CourtContenus De Marque Et Storytelling Court
Contenus De Marque Et Storytelling Court
 

Similar to Evolving Custom Communication Protocols

Automatic algorithm invention
Automatic algorithm inventionAutomatic algorithm invention
Automatic algorithm inventionWesley Faler
 
Weakly Supervised Whole Slide Image Analysis Using Cloud Computing
Weakly Supervised Whole Slide Image Analysis Using Cloud ComputingWeakly Supervised Whole Slide Image Analysis Using Cloud Computing
Weakly Supervised Whole Slide Image Analysis Using Cloud ComputingSean Yu
 
Deep Parameters Tuning for Android Mobile Apps
Deep Parameters Tuning for Android Mobile AppsDeep Parameters Tuning for Android Mobile Apps
Deep Parameters Tuning for Android Mobile AppsDavide De Chiara
 
Mining Assumptions for Software Components using Machine Learning
Mining Assumptions for Software Components using Machine LearningMining Assumptions for Software Components using Machine Learning
Mining Assumptions for Software Components using Machine LearningLionel Briand
 
Sista: Improving Cog’s JIT performance
Sista: Improving Cog’s JIT performanceSista: Improving Cog’s JIT performance
Sista: Improving Cog’s JIT performanceESUG
 
Monitoring Complex Systems: Keeping Your Head on Straight in a Hard World
Monitoring Complex Systems: Keeping Your Head on Straight in a Hard WorldMonitoring Complex Systems: Keeping Your Head on Straight in a Hard World
Monitoring Complex Systems: Keeping Your Head on Straight in a Hard WorldBrian Troutwine
 
Programming the Cell Processor A simple raytracer from pseudo-code to spu-code
Programming the Cell Processor A simple raytracer from pseudo-code to spu-codeProgramming the Cell Processor A simple raytracer from pseudo-code to spu-code
Programming the Cell Processor A simple raytracer from pseudo-code to spu-codeSlide_N
 
Introduzione ai network penetration test secondo osstmm
Introduzione ai network penetration test secondo osstmmIntroduzione ai network penetration test secondo osstmm
Introduzione ai network penetration test secondo osstmmSimone Onofri
 
(DVO205) Monitoring Evolution: Flying Blind to Flying by Instrument
(DVO205) Monitoring Evolution: Flying Blind to Flying by Instrument(DVO205) Monitoring Evolution: Flying Blind to Flying by Instrument
(DVO205) Monitoring Evolution: Flying Blind to Flying by InstrumentAmazon Web Services
 
The Selfish Stack [FutureStack16 NYC]
The Selfish Stack [FutureStack16 NYC]The Selfish Stack [FutureStack16 NYC]
The Selfish Stack [FutureStack16 NYC]New Relic
 
Scale CPU Experiences: Maximize Unity* Performance Using the Entity Component...
Scale CPU Experiences: Maximize Unity* Performance Using the Entity Component...Scale CPU Experiences: Maximize Unity* Performance Using the Entity Component...
Scale CPU Experiences: Maximize Unity* Performance Using the Entity Component...Intel® Software
 
Lunch session: Quantum Computing
Lunch session: Quantum ComputingLunch session: Quantum Computing
Lunch session: Quantum ComputingRolf Huisman
 
(BDT207) Real-Time Analytics In Service Of Self-Healing Ecosystems
(BDT207) Real-Time Analytics In Service Of Self-Healing Ecosystems(BDT207) Real-Time Analytics In Service Of Self-Healing Ecosystems
(BDT207) Real-Time Analytics In Service Of Self-Healing EcosystemsAmazon Web Services
 
RedisConf17 - Redis in High Traffic Adtech Stack
RedisConf17 - Redis in High Traffic Adtech StackRedisConf17 - Redis in High Traffic Adtech Stack
RedisConf17 - Redis in High Traffic Adtech StackRedis Labs
 
Robustness Metrics for ML Models based on Deep Learning Methods
Robustness Metrics for ML Models based on Deep Learning MethodsRobustness Metrics for ML Models based on Deep Learning Methods
Robustness Metrics for ML Models based on Deep Learning MethodsData Science Milan
 
Autobots @ REA
Autobots @ REAAutobots @ REA
Autobots @ REAggiesemann
 
Causal reasoning and Learning Systems
Causal reasoning and Learning SystemsCausal reasoning and Learning Systems
Causal reasoning and Learning SystemsTrieu Nguyen
 
Mi rna data analysis 2013
Mi rna data analysis 2013Mi rna data analysis 2013
Mi rna data analysis 2013Elsa von Licy
 
Data Summer Conf 2018, “How we build Computer vision as a service (ENG)” — Ro...
Data Summer Conf 2018, “How we build Computer vision as a service (ENG)” — Ro...Data Summer Conf 2018, “How we build Computer vision as a service (ENG)” — Ro...
Data Summer Conf 2018, “How we build Computer vision as a service (ENG)” — Ro...Provectus
 

Similar to Evolving Custom Communication Protocols (20)

Automatic algorithm invention
Automatic algorithm inventionAutomatic algorithm invention
Automatic algorithm invention
 
Weakly Supervised Whole Slide Image Analysis Using Cloud Computing
Weakly Supervised Whole Slide Image Analysis Using Cloud ComputingWeakly Supervised Whole Slide Image Analysis Using Cloud Computing
Weakly Supervised Whole Slide Image Analysis Using Cloud Computing
 
Deep Parameters Tuning for Android Mobile Apps
Deep Parameters Tuning for Android Mobile AppsDeep Parameters Tuning for Android Mobile Apps
Deep Parameters Tuning for Android Mobile Apps
 
Mining Assumptions for Software Components using Machine Learning
Mining Assumptions for Software Components using Machine LearningMining Assumptions for Software Components using Machine Learning
Mining Assumptions for Software Components using Machine Learning
 
Sista: Improving Cog’s JIT performance
Sista: Improving Cog’s JIT performanceSista: Improving Cog’s JIT performance
Sista: Improving Cog’s JIT performance
 
Monitoring Complex Systems: Keeping Your Head on Straight in a Hard World
Monitoring Complex Systems: Keeping Your Head on Straight in a Hard WorldMonitoring Complex Systems: Keeping Your Head on Straight in a Hard World
Monitoring Complex Systems: Keeping Your Head on Straight in a Hard World
 
Programming the Cell Processor A simple raytracer from pseudo-code to spu-code
Programming the Cell Processor A simple raytracer from pseudo-code to spu-codeProgramming the Cell Processor A simple raytracer from pseudo-code to spu-code
Programming the Cell Processor A simple raytracer from pseudo-code to spu-code
 
Introduzione ai network penetration test secondo osstmm
Introduzione ai network penetration test secondo osstmmIntroduzione ai network penetration test secondo osstmm
Introduzione ai network penetration test secondo osstmm
 
(DVO205) Monitoring Evolution: Flying Blind to Flying by Instrument
(DVO205) Monitoring Evolution: Flying Blind to Flying by Instrument(DVO205) Monitoring Evolution: Flying Blind to Flying by Instrument
(DVO205) Monitoring Evolution: Flying Blind to Flying by Instrument
 
The Selfish Stack [FutureStack16 NYC]
The Selfish Stack [FutureStack16 NYC]The Selfish Stack [FutureStack16 NYC]
The Selfish Stack [FutureStack16 NYC]
 
Scale CPU Experiences: Maximize Unity* Performance Using the Entity Component...
Scale CPU Experiences: Maximize Unity* Performance Using the Entity Component...Scale CPU Experiences: Maximize Unity* Performance Using the Entity Component...
Scale CPU Experiences: Maximize Unity* Performance Using the Entity Component...
 
Lunch session: Quantum Computing
Lunch session: Quantum ComputingLunch session: Quantum Computing
Lunch session: Quantum Computing
 
(BDT207) Real-Time Analytics In Service Of Self-Healing Ecosystems
(BDT207) Real-Time Analytics In Service Of Self-Healing Ecosystems(BDT207) Real-Time Analytics In Service Of Self-Healing Ecosystems
(BDT207) Real-Time Analytics In Service Of Self-Healing Ecosystems
 
RedisConf17 - Redis in High Traffic Adtech Stack
RedisConf17 - Redis in High Traffic Adtech StackRedisConf17 - Redis in High Traffic Adtech Stack
RedisConf17 - Redis in High Traffic Adtech Stack
 
Neural Networks and Applications
Neural Networks and ApplicationsNeural Networks and Applications
Neural Networks and Applications
 
Robustness Metrics for ML Models based on Deep Learning Methods
Robustness Metrics for ML Models based on Deep Learning MethodsRobustness Metrics for ML Models based on Deep Learning Methods
Robustness Metrics for ML Models based on Deep Learning Methods
 
Autobots @ REA
Autobots @ REAAutobots @ REA
Autobots @ REA
 
Causal reasoning and Learning Systems
Causal reasoning and Learning SystemsCausal reasoning and Learning Systems
Causal reasoning and Learning Systems
 
Mi rna data analysis 2013
Mi rna data analysis 2013Mi rna data analysis 2013
Mi rna data analysis 2013
 
Data Summer Conf 2018, “How we build Computer vision as a service (ENG)” — Ro...
Data Summer Conf 2018, “How we build Computer vision as a service (ENG)” — Ro...Data Summer Conf 2018, “How we build Computer vision as a service (ENG)” — Ro...
Data Summer Conf 2018, “How we build Computer vision as a service (ENG)” — Ro...
 

Recently uploaded

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 

Recently uploaded (20)

Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 

Evolving Custom Communication Protocols

  • 1. Evolving Custom Communication Protocols by Wes Faler of Part-Time Scientists for 28C3, Berlin Germany, 2011 wf@ptscientists.com
  • 2. Why  What  How  Code and Details  Results  Your turn! <presentation>
  • 3. Part-Time Scientists needed a communication protocol between our Earth stations and our rover on the moon. Why
  • 4. Given: ◦ A fixed set of hardware components for a packet transmitter and receiver. ◦ Video and telemetry streams that must go from the moon to Earth. ◦ A stream of commands that must go from Earth to the rover on the moon.  Create: ◦ A finite state machine that provides the network and application layer control of a transceiver used on both earth and the moon. What
  • 5. Must be a published open protocol.  Cannot use encryption.  Long latency.  High packet cost and value.  Bandwidth is limited and saturated.  May tunnel through another protocol.  TCP/IP is not an option. What - Complications
  • 7.  Create parameterized algorithm  One-at-time simulation Easy as 1…2…
  • 8. Parameter sweep int driver_movesPerTransaction[] = { 1, 20 }; int driver_wheelTicksPerCommand[] = { 512, 4096 }; int driver_commandsPerPacket[] = { 1, 25 }; int driver_moveCommandsPerCameraCommand[] = { 0, 10 }; float earth_packetTimeout[] = { 5, 30 }; int earth_maxAllowedBacklogCount[] = { 10 }; float burst_upstreamBurstErrorChance[] = { 0, 0.05 }; float burst_downstreamBurstErrorChance[] = { 0, 0.05 }; float rover_naggleDuration[] = { 0.5 }; int rover_packetQueueSize[] = { 10, 0 }; int rover_shouldFinishMoveQueueBeforeCommRecovery[] = { 1, 0 }; float rover_commRecoveryDuration[] = { 5, 30 }; float rover_moveCommandCommOutageChance[] = { 0.01, 0 }; float rover_steerCommandCommOutageChance[] = { 0.01, 0 }; Easy as 1…2…3…
  • 9. GPU  Before: 1 simulation/second  Port unoptimized C++ code to GPU ◦ Least programming effort possible ◦ Just for parameter sweeps  After: 700 seconds for 5200 simulations ◦ 7.4 simulations/second  Run a million simulations Easy as 1…2…3…4.
  • 10. Results – Distance Travelled
  • 11. Just a few small changes…
  • 12. Given: ◦ A fixed set of hardware components for a packet transmitter and receiver. ◦ Video and telemetry streams that must go from the moon to Earth. ◦ A stream of commands that must go from Earth to the rover on the moon. ◦ Changing requirements from stakeholders.  While(!Launched yet) ◦ Create:  A finite state machine that provides the network and application layer control. What, rev.2
  • 13. http://xkcd.com/974/ “The General Problem” Can you pass the data?
  • 14. Given: ◦ A partial existing system structure  Inputs  Output(s)  Formula structure ◦ Test cases ◦ Constraints  Create: ◦ The optimal set of parameters ◦ An equation or algorithm Invention – GP
  • 16. Cartesian Genetic Programming (CGP) ◦ Generates equations like circuits. ◦ Parallelizable results. ◦ FPGA friendly. ◦ Operators for simple math and logic.  Constant  Add, Subtract, Negative  Add Constant, Subtract Constant  NOP, !, &&, ||,  > Constant, >= Constant,== Constant  >, >=, == How – CGP
  • 17. Make a random “circuit”. + && * - + > How – CGP
  • 18. Score the circuit. + && * - + > Test #1: Terrible Test #2: Terrible Test #3: Terrible Score: Terrible*3 How – CGP
  • 19. Make random changes and rescore. + + * - + / Test #1: Terrible Test #2: Terrible-4 Test #3: Terrible Score: Terrible*3-4 How – CGP
  • 20. Start with 1 parent. 500 How - CGP
  • 21.  Start with 1 parent.  Make mutant children. 500 500 How - CGP
  • 22.  Start with 1 parent.  Make mutant children.  Score everyone. 500 500 500 725 How - CGP
  • 23.  Start with 1 parent.  Make mutant children.  Score everyone.  Promote the best child that isn’t worse than the parent. ◦ Must promote anything equal to the parent! 500 500 500 500 725 How - CGP
  • 24.  Start with 1 parent.  Make mutant children.  Score everyone.  Promote the best child that isn’t worse than the parent. ◦ Must promote anything equal to the parent! 500 500 500 85 500 85 725 97 How - CGP
  • 25. Nc No Ni Nr Gene Operator type + Constant Input indexes Terminology
  • 26. + && * - + > Runtime Optimization
  • 27. Individual  Executor and Optimizer  Mutator  Population  Support ◦ Threadsafe, GPU-friendly random numbers ◦ Save, Load ◦ Images Code – CGP Core
  • 28. Mission Enders ◦ Make rover execute attacker’s commands ◦ Prevent rover execution of real commands ◦ Prevent acceptance of video data  High Risk ◦ Make mission control accept false telemetry ◦ Delay rover execution of real commands How – Attacker’s Goals
  • 29. Discrete Event System simulation ◦ Priority queue of events ordered by time ◦ Set of Actors creating and handling events  Packet is control flag array and payload  Outer Space as random Actor ◦ Lose ◦ Replay ◦ Echo ◦ Corrupt How – Simulation structure
  • 30. Transceiver as set of Actors ◦ Data Ready To Transmit ◦ Data Received ◦ Packet Expired in Transmit History  Attacker as Actor  Actors == Chromosomes ◦ Scored separately ◦ Promoted separately ◦ Combines partial solutions for next generation How – Simulation structure
  • 31. Coevolved  Full knowledge of packet structure  Can crack private keys  Sees all packets  Cannot prevent packet delivery ◦ No “man in the middle” attacks  Able to send to anyone  Risk when transmitting How - Attacker
  • 32.  Stateful and large for complex strategy  Single Chromosome in feedback loop Packet Packet In Out Attacker Timer State How – Attacker Structure
  • 33. Generational fitness  Best fitness  Validated fitness  Penalties/Rewards ◦ Accepted bad signature ◦ Accepted attacker packet ◦ Accepted unknown data ◦ Accepted data more than once ◦ Never accepted data ◦ Accepted data with wrong data type ◦ Command packet accepted successfully How - Fitness
  • 34. Validated Fitness vs. Fitness 700000 600000 R² = 0.8807 500000 Spearman's Rank (p) = 0.9188 Validated Fitness 400000 300000 200000 100000 0 0 50000 100000 150000 200000 250000 300000 350000 Fitness Tip – Validate Fitness
  • 35. Can the control logic be automatically created by Cartesian Genetic Programming (CGP)?  If so, is the logic robust? ◦ Can it work with poor signal quality? ◦ Can it work with an attacker?  Should the control logic be created: ◦ In isolation? ◦ Considering only poor signal quality cases? ◦ Considering an attacker?  Can an attacker’s control logic be created at a faster pace than the network logic? How - Questions to answer
  • 36.  Experiment  Worlds ◦ Data schedule ◦ Actors  Execution  Fitness ◦ Generational fitness ◦ Best fitness ◦ Validated fitness Code – Simulation Core
  • 37. Can CGP make control logic?
  • 38. Can CGP make control logic?
  • 39.  Randomize everything!  Reduce randomness in fitness  Threadsafe random numbers  Incentivize ◦ “Mute” attackers  Increase population size  Dust-off your statistics books More Tips
  • 40. Population 4 Population 8 Fitness 2x Evaluations Run time 3x Same Much better generations fitness Same run time Equal fitness Equal fitness Population Size Effects
  • 41. Generation fitness without an attacker 140000 120000 100000 80000 fitness bestFitness validatedFitness 60000 40000 20000 0 0 20000 40000 60000 80000 100000 120000 140000 160000 180000 200000 Does an attacker help?
  • 42. Generation fitness with an attacker 100000 90000 80000 70000 60000 fitness 50000 bestFitness 40000 validatedFitness 30000 20000 10000 0 0 20000 40000 60000 80000 100000 120000 140000 160000 180000 200000 Does an attacker help?
  • 43. Does an attacker’s presence produce a better transceiver? No attacker With attacker Best fitness 18316 23208 Validated fitness 134542 137494 Active genes +50% Fitness:Generation Medium Near Zero correlation Other Fitness:Generation Medium Medium Val. Fitness:Gen. Slope 2x Does an attacker help?
  • 44. Can the control logic be automatically created by Cartesian Genetic Programming (CGP)?  If so, is the logic robust? ◦ Can it work with poor signal quality? ◦ Can it work with an attacker?  Should the control logic be created: ◦ In isolation? ◦ Considering only poor signal quality cases? ◦ Considering an attacker?  Can an attacker’s control logic be created at a faster pace than the network logic? Results - Questions answered
  • 45. CGP on GPU  Worlds on GPU  Finer-grain Chromosomes  New “best” selection with an attacker  Islands  Freezing transceiver or attacker  Attacker detection and countermeasures Future
  • 46. Danke!  <shameless recruiting ad> ◦Join us at ptscientists.com!  </shameless recruiting ad>  Wes Faler of Part-Time Scientists ◦ wf@ptscientists.com </presentation>
  • 47. Code and presentation ◦ http://wp.me/pGgFl-V  Julian Miller (inventor of CGP) ◦ http://sites.google.com/site/julianfrancismiller/prof essional  “Cartesian Genetic Programming” book ◦ http://www.springer.com/computer/theoretical+co mputer+science/book/978-3-642-17309-7  “Evolved to Win” e-book ◦ http://www.moshesipper.com/etw/  “Communication Protocol Engineering” book by Miroslav Popovic Resources

Editor's Notes

  1. Cracking private keys is a random occurrence with increasing odds as more packets using the same key are seen.
  2. Cracking private keys is a random occurrence with increasing odds as more packets using the same key are seen.