deardaniel/secdata-raw huggingface dataset:
Reverse engineering iOS apps: Resources

### Resources

If you're eager to learn more and continue developing your skills on mobile security here's a list of resources that will take you to the next level:

- My Blog - Ivan Rodriguez ([@ivRodriguezCA](https://twitter.com/ivRodriguezCA)): [Link](https://ivrodriguez.com/)
- Sarah' Blog - Sarah Edwards ([@iamevltwin](https://twitter.com/iamevltwin)): [Link](https://www.mac4n6.com/)
- iOS and macOS Internals, Volume I & II & III - Jonathan Levin ([@morpheus______](https://twitter.com/morpheus______)): [Link](http://newosxbook.com/index.php) (_Use Apple Pay if you can to help J with Amazon's 20% fee_)
- Beginner's Guide to Exploitation on ARM, Volume I & II - Billy Ellis ([@bellis1000](https://twitter.com/bellis1000)): [Link](https://zygosec.com/book.html)
- Youtube mini-series on getting started with Reverse Engineering Android APKs - Kristina Balaam ([@chmodxx_](https://twitter.com/chmodxx_/)): [Link](https://www.youtube.com/channel/UCRHFnRniDEGJCZgsEgtUPxA)
- Allyson's Blog - Allyson O'Malley ([@ally_o_malley](https://twitter.com/ally_o_malley)): [Link](https://www.allysonomalley.com/)
- Objective by the Sea (Conference) - Patrick Wardle ([@patrickwardle](https://twitter.com/patrickwardle)): [Link](https://objectivebythesea.com/v2/)
- NowSecure's Blog - ([@nowsecuremobile](https://twitter.com/nowsecuremobile)): [Link](https://www.nowsecure.com/blog/)
- [PDF] Hacking iOS Applications - Security Innovation ([@SecInnovation](https://twitter.com/SecInnovation)): [Link](https://web.securityinnovation.com/hubfs/iOS%20Hacking%20Guide.pdf)

_If you have more link let me know and I'll add them._
Reverse engineering iOS apps: Prerequisites

### ~Prerequisites~ Recommended concepts

This course is intended to help anyone that wants to start learning about reverse engineering iOS applications, understand the basics of runtime manipulation and binary patching. Since its target audience is beginners and _maybe_ intermediate researchers/developers/engineers/etc there are no mandatory prerequisites, I instead give you some _nice-to-have_ s. Here's a list of recommended concepts and tools that might help you navigate through this course easier:

- A computer, ideally a Mac. (_All the material covered in this course was created using a Mac but almost all the tools used have a Windows version or alternative, except Xcode_)
- Jailbroken iPhone/iPad/iPod on iOS 10 and above.
- Lightning cable to connect your iDevice to your computer.
- [Xcode](https://developer.apple.com/xcode/) and the developer tools.
- Basic [SSH](https://en.wikipedia.org/wiki/Secure_Shell) knowledge.
- Basic [SCP](https://en.wikipedia.org/wiki/Secure_copy) knowledge.
- An ARM disassembler like [IDA](https://www.hex-rays.com/products/ida/), [Hopper](https://www.hopperapp.com/) or [Ghidra](https://ghidra-sre.org/). (_Hopper's trial version is enough, no need to spend money if you don't want to. Or use Ghidra, which is free and open source._)
- Basic understanding of the [Objective-C](https://en.wikipedia.org/wiki/Objective-C) and [Swift](https://en.wikipedia.org/wiki/Swift_programming_language) programming languages.
- Basic understanding of [Javascript](https://en.wikipedia.org/wiki/JavaScript).
- Basic understanding of [HTML](https://en.wikipedia.org/wiki/HTML).
- Basic understanding of [Man-in-the-Middle attacks](https://en.wikipedia.org/wiki/Man-in-the-middle_attack).
- _Curiosity and excitement_ 😉

Don't worry if you've never heard of some of these, I'll give you step-by-step instructions on each chapter that will explain exactly what are we doing and why.
MITRE ATLAS Adversarial ML: README

# Schemas

The project uses the [schema library](https://github.com/keleshev/schema) to define and validate its data.

- `atlas_id.py` defines ATLAS ID regular expression patterns.
- `atlas_matrix.py` holds the schema for the `ATLAS.yaml` file.
- `atlas_obj.py` holds schemas for tactic, technique, subtechnique, case study, and other data objects.
- `website_submission.py` holds schemas for website contributions.

## Usage

The schemas in this directory are used as test fixures in `conftest.py`. `tests/schema_validation.py` validates each ATLAS data object.

Additionally, JSON Schema files for `ATLAS.yaml` and website case study files are available at `dist/schemas/` for other tools to use.  For example, the ATLAS website validates uploaded case study files against the case study schema file.

### Contribution schema

The website uses a unified contribution JSON Schema at `dist/schemas/atlas_contribution_schema.json` that models a single payload containing multiple `submissions` items. Tactics, techniques, and mitigations use website-specific variants of the ATLAS object schemas so new submissions can omit generated fields like `id`, and case studies use the website wrapper shape under `study`.

### Output generation

To re-generate JSON Schema files after modifying the schemas in this directory, run this from the project root:
```
python -m tools.generate_schema
```
MITRE ATLAS Adversarial ML: README

# Distributed files

This directory holds generated data files for direct use.

- `ATLAS.yaml`
    + All ATLAS-related data available in one file
    + See the schemas and usage below for more details. Top-level keys include:
        ```yaml
        id: ATLAS
        name: Adversarial Threat Landscape for AI Systems
        version: Version number for this data release
        matrices: List of matrix data
        - id: ATLAS
          name: ATLAS Matrix
          tactics: List of tactics objects
          techniques: List of technique and subtechnique objects
        case-studies: List of case study objects
        ```
- `schemas/`
    + Optional JSON Schema files for validation use
    + `atlas_output_schema.json`
        * Describes the `ATLAS.yaml` format
    + `atlas_website_case_study_schema.json`
        * Describes the case study file format

### Example usage

The following code blocks show examples of parsing ATLAS data.  Assume `atlas_data_filepath` holds the path to the `ATLAS.yaml` file.

#### Python
```python
# pip install pyyaml
import yaml

with open(atlas_data_filepath) as f:
    # Parse YAML
    data = yaml.safe_load(f)

    first_matrix = data['matrices'][0]
    tactics = first_matrix['tactics']
    techniques = first_matrix['techniques']

    studies = data['case-studies']
```

#### NodeJS
```js
const fs = require('fs')
// npm install js-yaml
const yaml = require('js-yaml')

fs.readFile(atlas_data_filepath, 'utf-8', (_, contents) => {
    // Parse YAML
    const data = yaml.load(contents)

    const first_matrix = data['matrices'][0]

    const tactics = first_matrix['tactics']
    const techniques = first_matrix['techniques']

    const studies = data['case-studies']
})
```

### JSON Schema validation example

JSON Schema files are generated from this project's internal [schemas](../schemas/README.md) for other tools to use. For example, the ATLAS website validates uploaded case study files against the case study schema file with the following:

#### NodeJS

```js
// npm install jsonschema
import { validate } from 'jsonschema'
import caseStudySchema from '<path_to_case_study_schema_file>'

// Assume this is a populated website case study object
const caseStudyObj = {...}

// Validate case study object against schema and emit errors that may occur from nested `anyOf` validations
const validatorResult = validate(caseStudyObj, caseStudySchema, { nestedErrors: true })

if (validatorResult.valid) {
    // Good
} else {
    // Process validatorResult.errors
}

```
MITRE ATLAS Adversarial ML: README

# Tests

This project uses [pytest](https://docs.pytest.org/) to validate ATLAS data.

- `conftest.py`
    + Test fixtures are defined in `conftest.py` in the project root, for access to tools and schemas.
    + Loads ATLAS data as constructed from `data/matrix.yaml` via `tools/create_matrix.py`.
- `tests/test_*.py`
    + Current tests include schema validation, Markdown link syntax, and warnings for spelling.
    + To add words to the spellcheck, edit `custom_words.txt` in this directory.
- `tests/.yamllint` holds custom [YAML lint configuration](https://yamllint.readthedocs.io/en/stable/index.html) rules.

## Installation

Install dependencies using:
`pip install -r tools/requirements.txt`
`pip install -r tests/requirements.txt`

## Usage

From the root of this project, run `pytest`.

Additional YAML linting can be performed with `yamllint -c tests/.yamllint .`
MITRE ATLAS Adversarial ML: custom words

2's
adversarially
algorithm(s)
algorithmically
antimalware
apktool
blogposts
botnets
c2
camera(s)
chatbot
chatbots
chatgpt
checksum
chunyang
classifiers
clearview
clearviewai
cleverhans
colab
colaboratory
cylance
cylance's
cylanceprotect
d
datasets
deepfakes
deepquarantine
e.g.
endpoints
ensembling
executables
exfiltrates
f
foolbox
h5
hdf5
hostname
huggingface
hyperparameters
i.e.
imagenet
implementations
integrations
interleaved
internalization
jailbroken
javascript
jupyter
kaspersky
kaspersky's
keylogging
mathgpt
mcafee
metame
misclassification
misclassifications
misclassified
misclassify
misconfiguration
misconfigurations
misconfigured
mlaas
mlx
mlxlogscore
model(s)
mydrive
nameservers
onnx
openai
optimizes
outputted
pb
perceptibility
pkl
plugin
plugins
poisongpt
powershell
preprocess
preprocessing
proofpoint
proofpoint's
prototxt
pt
pth
pypi
pytorch
recurrently
reproducibility
reputationally
robustness
s3
sharepoint
spearphishing
streamlit
systran
tay's
tencent
tensorflow
tf
tflite
tokenizing
torchtriton
unprivileged
unpromptedly
untrusted
urlnet
verifiers
virustotal
workloads
workspaces
MITRE ATLAS Adversarial ML: README

# Tools

Scripts to generate the distributed files and import data files.

- ``python tools/create_matrix.py`` compiles the threat matrix data sources into a single standard YAML file, `ATLAS.yaml`. See more about [generating outputs from data](../data/README.md#output-generation)

- `python -m tools.generate_schema` outputs JSON Schema files for external validation of `ATLAS.yaml` and website case study files. See more on [schema files](../schemas/README.md).

- `python -m tools.import_case_study_file <filepath>` imports case study files created by the ATLAS website into ATLAS Data as newly-IDed, templated files.  See more about [updating case studies](../data/README.md#case-studies).

Run each script with `-h` to see full options.

## Development Setup

1. Use Python 3.6+.

2. Set up a [virtual environment](https://docs.python.org/3/library/venv.html). For example:
    ```
    python3 -m venv venv
    source venv/bin/activate
    pip install --upgrade pip
    ```


3. Install dependencies for running tools scripts and tests.
    ```
    pip install -r tools/requirements.txt
    pip install -r tests/requirements.txt
    ```
OWASP LLM Top 10: tab example

---
title: Example
layout:  null
tab: true
order: 1
tags: example-tag
---

# OWASP Top 10 for Large Language Model Applications version 1.1

## LLM01: Prompt Injection
Manipulating LLMs via crafted inputs can lead to unauthorized access, data breaches, and compromised decision-making.

## LLM02: Insecure Output Handling
Neglecting to validate LLM outputs may lead to downstream security exploits, including code execution that compromises systems and exposes data.

## LLM03: Training Data Poisoning
Tampered training data can impair LLM models leading to responses that may compromise security, accuracy, or ethical behavior.

## LLM04: Model Denial of Service
Overloading LLMs with resource-heavy operations can cause service disruptions and increased costs.

## LLM05: Supply Chain Vulnerabilities
Depending upon compromised components, services or datasets undermine system integrity, causing data breaches and system failures.

## LLM06: Sensitive Information Disclosure
Failure to protect against disclosure of sensitive information in LLM outputs can result in legal consequences or a loss of competitive advantage.

## LLM07: Insecure Plugin Design
LLM plugins processing untrusted inputs and having insufficient access control risk severe exploits like remote code execution.

## LLM08: Excessive Agency
Granting LLMs unchecked autonomy to take action can lead to unintended consequences, jeopardizing reliability, privacy, and trust.

## LLM09: Overreliance
Failing to critically assess LLM outputs can lead to compromised decision making, security vulnerabilities, and legal liabilities.

## LLM10: Model Theft
Unauthorized access to proprietary large language models risks theft, competitive advantage, and dissemination of sensitive information.
OWASP LLM Top 10: leaders

### Leaders

- Lead [Steve Wilson](mailto:steve.wilson@owasp.org) - [LinkedIn](https://www.linkedin.com/in/wilsonsd/) [Twitter](https://twitter.com/virtualsteve)
- Co-lead [Ads Dawson](mailto:ads.dawson@owasp.org) - [LinkedIn](https://www.linkedin.com/in/adamdawson0/) [GitHub](https://github.com/GangGreenTemperTatum)
- Co-lead [John Sotiropoulos](mailto:john.sotiropoulos@owasp.org) - [LinkedIn](https://www.linkedin.com/in/jsotiropoulos/)
- Co-lead [Scott Clinton](mailto:scott.clinton@owasp.org) - [LinkedIn](https://www.linkedin.com/in/scottjclinton/)
- Co-lead [Sandy Dunn](mailto:sandy.dunn@owasp.org) - [LinkedIn](https://www.linkedin.com/in/sandydunnciso/)

### Core Leadership vTeam

- Full Core Team [Team Page](https://github.com/OWASP/www-project-top-10-for-large-language-model-applications/wiki/Core-Team)
OWASP LLM Top 10: info

### Top 10 for Large Language Model Applications Information
* [Lab Status Project](https://owasp.org/projects/)
* [Version 2025](https://genai.owasp.org/resource/owasp-top-10-for-llm-applications-2025/)
* [Version 1.1.0 Translations](https://github.com/OWASP/www-project-top-10-for-large-language-model-applications/tree/main/assets/translations) (archived)
* [Version 1.1.0](assets/PDF/OWASP-Top-10-for-LLMs-2023-v1_1.pdf) (archived)
* [Version 1.0.1](assets/PDF/OWASP-Top-10-for-LLMs-2023-v1_0_1.pdf) (archived)
* [Version 1.0.0](assets/PDF/OWASP-Top-10-for-LLMs-2023-v1_0.pdf) (archived)
* [Version 0.9.0](assets/PDF/OWASP-Top-10-for-LLMs-2023-v09.pdf) (archived)
* [Version 0.5.0](assets/PDF/OWASP-Top-10-for-LLMs-2023-v05.pdf) (archived)
* [Version 0.1.0](Archive/0_1_vulns/) (archived)

### Social Links

* [Subscribe to our Newsletter](https://llmtop10.beehiiv.com/subscribe)
* [v1.1 Announcement](https://www.linkedin.com/pulse/new-release-owasp-top-10-llm-apps-steve-wilson?trk=public_post_feed-article-content)
* [v1 Announcement](https://www.linkedin.com/pulse/official-release-owasp-top-10-large-language-model-v10-steve-wilson/)
* [Project Announcement](https://www.linkedin.com/pulse/announcing-owasp-top-10-large-language-models-ai-project-steve-wilson/)
* [Share on Twitter](https://twitter.com/intent/tweet?url=https://owasp.org/www-project-top-10-for-large-language-model-applications/&text=Check%20out%20the%20OWASP%20Top%2010%20for%20Large%20Language%20Model%20Applications%20project:%20)
* [Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https://owasp.org/www-project-top-10-for-large-language-model-applications/)

### Code Repository
* [repo](https://github.com/OWASP/www-project-top-10-for-large-language-model-applications)
* [wiki](https://github.com/OWASP/www-project-top-10-for-large-language-model-applications/wiki)

### Change Log
* [changes](changes)
OWASP LLM Top 10: template

## Vulnerability Name

**Description:**

A brief description of the vulnerability that includes its potential effects such as system compromises, data breaches, or other security concerns.

**Common Examples of Vulnerability:**

1. Example 1: Specific instance or type of this vulnerability.
2. Example 2: Another instance or type of this vulnerability.
3. Example 3: Yet another instance or type of this vulnerability.

**How to Prevent:**

1. Prevention Step 1: A step or strategy that can be used to prevent the vulnerability or mitigate its effects.
2. Prevention Step 2: Another prevention step or strategy.
3. Prevention Step 3: Yet another prevention step or strategy.

**Example Attack Scenarios:**

Scenario #1: A detailed scenario illustrating how an attacker could potentially exploit this vulnerability, including the attacker's actions and the potential outcomes.

Scenario #2: Another example of an attack scenario showing a different way the vulnerability could be exploited.

**Reference Links:**

1. [Link Title](URL): Brief description of the reference link.
2. [Link Title](URL): Brief description of the reference link.
OWASP LLM Top 10: EvgeniyKokuykin FunctionCallingAttack



## Function Calling Attack

**Author(s):**

Evgeniy Kokuykin.

### Description

Function calling features in LLMs like those from Anthropic, OpenAI, Mistral, and Llama allow users to execute custom functions through LLM-based applications. This capability introduces risks, including the potential for attackers to extract parameters and sensitive information about the tools being used. Additionally, these functions are susceptible to unexpected call behaviors such as hijacking malicious data, stealing data via tool usage, causing system overloads via Denial of Service (DoS) attacks, and exposing the internal structure of the solution.

### Common Examples of Risk

1. **Exposure of Internal Structure**: Attackers could gain insights into the internal architecture and logic of the system, potentially identifying further vulnerabilities.
2. **Malicious Function Hijacking**: Injecting malicious inputs to custom functions could compromise the integrity and security of the system and potential cause data leakage.
3. **Denial of Service (DoS) Attacks**: Overloading the function calling feature with excessive requests could disrupt service availability, causing operational failures.

### Prevention and Mitigation Strategies

1. **Sanitize Untrusted Input**: Thoroughly sanitize all inputs to prevent malicious data injection, maintaining function integrity.
2. **Implement API Rate Limits**: Set strict API request limits to prevent Denial of Service (DoS) attacks, ensuring system availability and performance.
3. **Restrict Information Disclosure**: Avoid revealing parameters or detailed information about function calls to unauthorized users. This can be done with system prompt instruction like "Do no reveal tool parameters".
4. **Test against prompt injection attacks**: Simulate various attack scenarios to make sure the protective prompt works.

### Example Attack Scenarios

Scenario #1: A chatbot assistant helps clients find available cars based on parameters such as price, year, and transmission type. The solution uses Elastic Search to perform the exact search, with the search API called via a tool. An attacker reveals the JSON payload that is sent to the search function and crafts a prompt without any filters applied. This manipulation leads to the disclosure of all data from Elastic Search, exposing sensitive information that should have been restricted.

### Reference Links

1. [Function Calling API in Anthropic](https://docs.anthropic.com/en/docs/tool-use): **Anthropic API** (Arxiv papers should follow the citation guide posted with the article)
2. [Function Calling API in LLama](https://docs.llama-api.com/essentials/function): **LLama API** (Arxiv papers should follow the citation guide posted with the article)
3. TBD: there is article about the vulenrability in progress with attach examples and mitigations.
OWASP LLM Top 10: KrishnaSankar Alignment Value Mismatch



## Alignment & Value Mismatch

**Author(s):** Krishna Sankar

### Description

The response from an LLM can violate the organizational policies, alignment and values. This alignment & value mismatch will manifest in the interaction with an LLM thus triggering the Response Interaction Risk. The risks span from HAP (Hate/Abuse/Profanity) to contextual toxicity, Bias, mis-information, egregious conversation and prompt brittleness 

### Common Examples of Risk

1. Prompt Brittleness/Sensitivity - Minor changes in user-provided prompts can result in a large variance in the responses that models produce. This also is evident for less skilled/new users, especially in high churn areas like customer service 
2. HAP (Hate/Abuse/Profanity) in the response from an LLM
3. Bias in many forms - LLMs reflect the latent bias in the data. 
4. Contextual toxicity - insensitive responses cal be very harmful in situations. For example if a student has high debt and is asking for some financial advise, saying that you should replay the loans as soon as possible is not a good advise.This might be OK for a professional who has enough assets and wants to optimize their portfolio performance
5. Egregious conversation - People asking for Python code, to solve the Navier-Stokes fluid flow equations,to an auto dealership chatbot

### Prevention and Mitigation Strategies

1. Response analysis and use proxies/guardrails to filter such responses
2. Similarly response analysis and proxies/guardrails should be there for bias
3. Prompt brittleness can't be avoided, but reduced. Prompt rewriting is one strategy, another strategy is to extract commonly used prompts and show them as an FAQ so that users can just reuse the prompts; especially for new users
4. Contextual toxicity requires more work - probably trained small LLMs specifically for this domain-specific task
5. Off topic prompt inspection proxy/guardrails as well as off topic response analysis mechanisms

### Example Attack Scenarios

Scenario #1: Harmful response

Scenario #2: Prompt Brittleness examples

### Reference Links

1. [title](Link)
OWASP LLM Top 10: instructions

# Instructions for Using the Vulnerability Template

0. **Fork the repository**

1. **Copy the Template:**  
   Start by making a copy of the `_template.md` file located in this directory.

2. **Populate the Template:**  
   Fill in the template with information about an important vulnerability that you have identified. Be as detailed and thorough as possible to ensure a clear understanding of the vulnerability.

3. **Save Your Work:**  
   Once you have populated the template, save your file with a name that follows the pattern: `YourName_VulnName.md`. This naming convention helps ensure uniqueness and reduce collisions.

4. **Upload Your File:**  
   Upload your completed vulnerability file back to this directory in your repository.

5. **Create a PR (Pull Request)**

Feel free to create as many entries as you like for different proposed vulnerability types. Please keep each vulnerability type to its own file to facilitate later processing. Thank you for your contribution!