- Trying to gauge the adoption of the tool
- Steady increase of stars
- Shodan as a search engine for computers on the Internet
- By using a query, 161k were discovered
- PHP, SQL, JS, and HTML as top most used programming languages
- Familiar for homelabbers
- The web installation page of Roundcube
- Plug the details in the browser and they will be stored on the server
- If the instance is exposed on the Internet, then anyone can set the details.
- Can you spot the missing steps?
- For example, TIFF
- The reason: custom function which are not known by default by the standard tools
- Approach for detecting if the configuration is returned
- Seeing later how can we run Semgrep
- Errors generated for the lines in red
Let's tackle the elephant in the room.
- Log4j
- CVSS of 10 (critical)
- CWE-502: Deserialization of Untrusted Data
- Links in the presentation, which will be accessible after the conference
- Identifiers from MITRE ATT&CK matrix
- Symetrically-encrypted channel communication
- Mimiking a legit service
- Vulnerable-by-design
- WebGoat
- Damn Vulnerable Web Application
- CloudGoat
- Vulnerabilities in dependencies
- Picture perfectly illustrating:
- An asset: the food
- A threat to our asset: the cat
- Threat modelling: being inspired enough to assume that the cat will attack when we open the fridge
- The first open source tool: OWASP Threat Dragon
- Video illustrating how easy it is to model the system and map the threats
- Remembering this image?
- The search scene from "Matrix"
- The next discussed technique: searching in the code, namely "code querying"
- Data structures specific to the abstract representation
- Just look at this image!
- How a compiler or another program understands the source code
- AST
- What is we have a way to query it?
- E.g., "all calls to logging functions where secrets are exposed"
- For this, we have Semgrep.
- Straight-forward installation
- This is another classic.
- Guesses?
- Idiocracy from 2005 in which the people are dumb enough to use brute-force to solve a childish game of matching
shapes and holes
- What is we use the same brute force approach?
- Optimisation
- Instrumenting the source code
- Knowing the input format
- Defining the states
- Testing all input streams
- Open source tool for this: AFL++
- Trying to fuzz the generate_recovery_token function
- Developing a harness that does ...
- Compile step
- A bug is found in the first iterations.
- If we use a debugger for checking why the program crashed, then we reach this function.
- Fixed size of the buffer, but user controlled length
- There was a habit to hide the keys.
- In the most visible place possible.
- An experience thief will try to initially search in this place.
- What if we try to do the same with the secrets that can be embedded in code?
- XKCD meme illustrating a chain of dependencies, which is familiar as a concept to us
- If you are in the Python or Node.js ecosystem, you'll have a similar tree of dependencies.
- What is one vulnerability appears in a dependency?
- Is our software vulnerable because it depends on that package?
- The short answer: no
- Maybe our software doesn't trigger the vulnerability.
- But how can we detect these vulnerabilities?
- Last section
- Standards for car safety
- Executing a bunch of checks that the car should partially or fully pass
- The same concept is applied in linting.
- Another section, another movie
- Maze Runner, in which they should run in a maze to initially map, and then escape it
- If we think about our programs as some mazes that we try to solve, then we can directly use the same concept.
- Considering the program on left
- The right part is what a symbolic execution engine will see.
- The same function we fuzzed before.
- Marking the `re` buffer and the `count` variable as symbolic
- Calling the `generate_recovery_token` function again
Keep this content synced with "wiki/docs/Other techniques.md"
- Every engineering linking some automation
Keep this content synced with "wiki/docs/Security tooling automation.md"
- Wrapping the presentation
- Familiar with the term "Ubuntu"
- But the word have yet another meaning, being a South African ethical concept
- Interview with Nelson Mandela
- In the open source space, there are multiple ways in which one can help.
- As mentioned at the beginning, these are not SotAs, so there is a lot of space for improvement.
- In this way, I can bet that the whole community will be grateful for your work.
- If there is a single thing that I want you to remember is this website.
- One can find there the presentation, exercises, a cheatsheet and more.