# Pentest on Server Side

## Apresentação

Agora basta você efetuar pentest utilizando o burp normalmente. Como exemplo vamos explorar um SQLi no nosso lab

## SQL Injection

Ao clicar em **"View Profile"**, a aplicação mostra as informações do perfil, ele pega isso consultando o token que conseguimos controlar

<figure><img src="/files/kwhnzXU7PnUtzvk2UN2y" alt=""><figcaption></figcaption></figure>

Ao tentar injetar um payload de sql injection, como por exemplo:

```
'+OR+1=1+--+-
```

<figure><img src="/files/1s8pnUixFml7K8XZumTG" alt=""><figcaption></figcaption></figure>

Após injetarmos o payload conseguimos dados de outro usuário, confirmando assim a evidência da vulnerabilidade

## Cross Site Scripting (XSS)

{% hint style="info" %}
Esse ataque que irei demonstrar obviamente não é uma vulnerabilidade real, pois eu estou literalmente alterando a resposta da página, isso não possui nenhum impacto.

A intenção de demonstar isso foi apenas para provar que tem como efetuar um ataque de XSS em aplicativos mobile.
{% endhint %}

Ao clicar em **"About US"** com o Burp ligado, podemos interceptar a resposta do servidor e adicionar um payload de xss para refletir na página.

<figure><img src="/files/at58LhEiqz3RuHwH3Jo8" alt=""><figcaption></figcaption></figure>

Agora vamos adicionar o payload para refletir na página

<figure><img src="/files/A3cH3jczWa2aGpd8iQCs" alt=""><figcaption></figcaption></figure>

Podemos ver que a resposta reflete na página

<figure><img src="/files/MTZWs3NlBR5y91llInbm" alt=""><figcaption></figcaption></figure>

## Conclusão

Não irei me aprofundar em vulenrabilidades WEB, pois o tópico é pentest em aplicativos iOS, mas se você já está familiariazado com pentest em WEB e API basta efetuar os mesmos testes aqui.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://vida03.gitbook.io/redteam/mobile/ios-pentest/server-side-vulnerabilities/pentest-on-server-side.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
