# 6379 - redis

redis는 데이터를 디스크가 아닌 메모리에 저장한 뒤, 스냅샷 등의 방식으로 영속성도 지원하는 오픈소스 데이터베이스 서비스입니다.

일반적으로 사용자 토큰을 저장하는 목적으로 데이터베이스 앞 단에 두어 캐시 히트(cache hit)를 기대하기 때문에, redis 내부에서 사용자 토큰을 탈취할 수 있습니다.

{% hint style="info" %}
redis는 기본적으로 익명 연결을 허용합니다.
{% endhint %}

## Abuse

<pre class="language-bash"><code class="lang-bash"><strong># 데이터 슬롯 변경 (0~15까지 존재)
</strong>select '&#x3C;slot-number>'

<strong># 현재 슬롯의 모든 key 조회
</strong>keys *

<strong># strings 데이터 기반 값조회
</strong>get '&#x3C;string-key>'

<strong># hashes 데이터 기반 값조회
</strong>hgetall '&#x3C;hashes-key>'
</code></pre>


---

# 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://www.pentestwiki.com/post-exploit/protocols/6379-redis.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.
