<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>ze-rith.log</title>
        <link>https://velog.io/</link>
        <description>화이트 해커</description>
        <lastBuildDate>Mon, 22 Jun 2026 03:31:50 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <image>
            <title>ze-rith.log</title>
            <url>https://velog.velcdn.com/images/ze-rith/profile/6e453d44-3053-4380-84a7-0fd26f48722b/image.jpeg</url>
            <link>https://velog.io/</link>
        </image>
        <copyright>Copyright (C) 2019. ze-rith.log. All rights reserved.</copyright>
        <atom:link href="https://v2.velog.io/rss/ze-rith" rel="self" type="application/rss+xml"/>
        <item>
            <title><![CDATA[제목: Riddle Registry]]></title>
            <link>https://velog.io/@ze-rith/%EC%A0%9C%EB%AA%A9-Riddle-Registry</link>
            <guid>https://velog.io/@ze-rith/%EC%A0%9C%EB%AA%A9-Riddle-Registry</guid>
            <pubDate>Mon, 22 Jun 2026 03:31:50 GMT</pubDate>
            <description><![CDATA[<p>문제
Hi, intrepid investigator! 📄🔍 You&#39;ve stumbled upon a peculiar PDF filled with what seems like nothing more than garbled nonsense. But beware! Not everything is as it appears. Amidst the chaos lies a hidden treasure—an elusive flag waiting to be uncovered.</p>
<p>Find the PDF file here Hidden Confidential Document and uncover the flag within the metadata.</p>
<p>링크
<a href="https://learn.cylabacademy.org/library/530?page=1&amp;category=4">https://learn.cylabacademy.org/library/530?page=1&amp;category=4</a> (문제 파일)</p>
<p>풀이과정</p>
<ol>
<li>파일을 열어보니 이런 pdf가 있었다.
<img src="https://velog.velcdn.com/images/ze-rith/post/b73da08f-6fe2-4212-a5ed-fa4d647b2bf0/image.png" alt=""></li>
<li>가려진 부분을 복사 붙여넣기 해보니 위에서 부터 Aenean lacinia bibendum nulla sed consectetu, Lorem ipsum dolor sit amet, The author have done a great and good job, No flag here. Nice try though! 이렇게 있었다.</li>
<li>pdf 내용에는 flag가 없는걸 확인 후 이 pdf의 메타데이터를 확인 해보기로 했다.
<img src="https://velog.velcdn.com/images/ze-rith/post/e73889e7-7a51-4fa1-80a9-fbb09ffdbd74/image.png" alt=""></li>
<li>여기의 author의 값이 인코딩 되어있는걸 확인했다.</li>
<li>이 값을 디코딩 해보니 정답이 나왔다.</li>
</ol>
<p>결과
<img src="https://velog.velcdn.com/images/ze-rith/post/c9e5f0e8-6635-4557-8ca3-07faf21b76cb/image.png" alt=""></p>
<p>정답
picoCTF{puzzl3d_m3tadata_f0und!_87be60c0}</p>
]]></description>
        </item>
        <item>
            <title><![CDATA[제목: Binary Digits]]></title>
            <link>https://velog.io/@ze-rith/%EC%A0%9C%EB%AA%A9-Binary-Digits</link>
            <guid>https://velog.io/@ze-rith/%EC%A0%9C%EB%AA%A9-Binary-Digits</guid>
            <pubDate>Mon, 22 Jun 2026 03:25:59 GMT</pubDate>
            <description><![CDATA[<p>문제
This file doesn&#39;t look like much... just a bunch of 1s and 0s. But maybe it&#39;s not just random noise. Can you recover anything meaningful from this?</p>
<p>Download the file here.</p>
<p>링크
<a href="https://learn.cylabacademy.org/library/698?page=1&amp;category=4">https://learn.cylabacademy.org/library/698?page=1&amp;category=4</a> (문제 파일)</p>
<p>풀이 과정 </p>
<ol>
<li>digits.bin을 메모장으로 열어보니 이 파일은 사실 0과 1로만 이루어진 텍스트 파일인걸 확인했다. (71,200글자)</li>
<li>핵심 관찰: 71200 ÷ 8 = 8900 정확히 나눠진다는 건 각 8비트 묶음이 바이트 하나를 의미한다는 뜻인 것 같다</li>
<li>변환: 8비트씩 끊어서 정수로 바꾸니 첫 두 바이트가 255, 216 (0xFF 0xD8) — JPEG 파일의 매직 넘버였다.</li>
<li>복구: 전체 비트스트림을 바이트로 변환해 .jpg로 저장하니 800×500 크기의 정상적인 JPEG 이미지가 나왔고, 그 안에 플래그 텍스트가 있었다.</li>
</ol>
<p>아래는 복구 코드</p>
<pre><code class="language-python"># 1. 비트 문자열 읽기
data = open(&#39;etc/digits.bin&#39;).read().strip()

# 2. 8개씩 끊어서 바이트로 변환
byte_arr = bytearray()
for i in range(0, len(data), 8):
    byte_str = data[i:i+8]      # 8글자씩 슬라이싱
    byte_arr.append(int(byte_str, 2))   # 2진수 문자열 -&gt; 정수

# 3. 파일로 저장
with open(&#39;recovered.jpg&#39;, &#39;wb&#39;) as f:
    f.write(byte_arr)</code></pre>
<p>결과
<img src="https://velog.velcdn.com/images/ze-rith/post/d1071bad-3219-4a7f-8dd5-b9d7c798478a/image.jpg" alt=""></p>
<p>답
picoCTF{h1dd3n_1n_th3_b1n4ry_8e65b559}</p>
]]></description>
        </item>
        <item>
            <title><![CDATA[2026/05/26]]></title>
            <link>https://velog.io/@ze-rith/20260526</link>
            <guid>https://velog.io/@ze-rith/20260526</guid>
            <pubDate>Tue, 26 May 2026 07:15:15 GMT</pubDate>
            <description><![CDATA[<p>진로를 정했다.
사이버 범죄 수사대
그래서 오늘은 앞으로의 로드맵을 만들어 봤다.
프로그래밍 기능사 실기책도 구매 했다.
앞으로 운동도 자주 해야겠다.
미래를 걱정하지 말고 지금을 살아보자.</p>
]]></description>
        </item>
        <item>
            <title><![CDATA[iptables]]></title>
            <link>https://velog.io/@ze-rith/iptables</link>
            <guid>https://velog.io/@ze-rith/iptables</guid>
            <pubDate>Mon, 13 Apr 2026 08:03:18 GMT</pubDate>
            <description><![CDATA[<h1 id="iptables-완벽-정리-리눅스-방화벽의-핵심-이해하기">iptables 완벽 정리: 리눅스 방화벽의 핵심 이해하기</h1>
<p>리눅스 서버를 운영하거나 보안을 공부하다 보면 반드시 만나게 되는 것이 바로 <strong>iptables</strong>입니다.
iptables는 리눅스에서 네트워크 패킷을 필터링하고 제어하는 강력한 도구로, 일종의 <strong>방화벽(Firewall)</strong> 역할을 합니다.</p>
<p>이번 글에서는 iptables의 기본 개념부터 실전 명령어까지 정리해보겠습니다.</p>
<hr>
<h2 id="📌-iptables란">📌 iptables란?</h2>
<p>iptables는 리눅스 커널의 <strong>Netfilter</strong> 기능을 기반으로 동작하는 사용자 공간 도구입니다.
네트워크를 통해 들어오고 나가는 패킷을 규칙(rule)에 따라 허용하거나 차단할 수 있습니다.</p>
<p>✔ 쉽게 말하면:</p>
<blockquote>
<p>&quot;들어오는 트래픽과 나가는 트래픽을 내가 원하는 대로 통제하는 시스템&quot;</p>
</blockquote>
<hr>
<h2 id="기본-구조-이해하기">기본 구조 이해하기</h2>
<p>iptables는 다음과 같은 구조로 이루어져 있습니다:</p>
<pre><code>Table → Chain → Rule</code></pre><h3 id="1️⃣-table-테이블">1️⃣ Table (테이블)</h3>
<p>iptables에는 여러 테이블이 존재합니다.</p>
<ul>
<li><code>filter</code> : 기본 테이블 (패킷 허용/차단)</li>
<li><code>nat</code> : IP 변환 (포트포워딩 등)</li>
<li><code>mangle</code> : 패킷 수정</li>
<li><code>raw</code> : 연결 추적 제외</li>
</ul>
<hr>
<h3 id="2️⃣-chain-체인">2️⃣ Chain (체인)</h3>
<p>각 테이블에는 체인이 존재합니다.</p>
<ul>
<li><code>INPUT</code> : 들어오는 패킷</li>
<li><code>OUTPUT</code> : 나가는 패킷</li>
<li><code>FORWARD</code> : 다른 곳으로 전달되는 패킷</li>
</ul>
<hr>
<h3 id="3️⃣-rule-규칙">3️⃣ Rule (규칙)</h3>
<p>체인 안에 있는 실제 필터링 규칙입니다.</p>
<p>예:</p>
<ul>
<li>특정 IP 차단</li>
<li>특정 포트 허용</li>
</ul>
<hr>
<h2 id="기본-명령어-정리">기본 명령어 정리</h2>
<h3 id="✔-현재-규칙-확인">✔ 현재 규칙 확인</h3>
<pre><code class="language-bash">iptables -L</code></pre>
<hr>
<h3 id="✔-특정-ip-차단">✔ 특정 IP 차단</h3>
<pre><code class="language-bash">iptables -A INPUT -s 192.168.0.10 -j DROP</code></pre>
<p>192.168.0.10에서 오는 모든 패킷 차단</p>
<hr>
<h3 id="✔-특정-포트-허용-예-80번-http">✔ 특정 포트 허용 (예: 80번 HTTP)</h3>
<pre><code class="language-bash">iptables -A INPUT -p tcp --dport 80 -j ACCEPT</code></pre>
<hr>
<h3 id="✔-기본-정책-설정">✔ 기본 정책 설정</h3>
<pre><code class="language-bash">iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT</code></pre>
<hr>
<h2 id="실전-예시-기본-보안-설정">실전 예시 (기본 보안 설정)</h2>
<pre><code class="language-bash"># 초기화
iptables -F

# 기본 정책
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT

# 로컬 허용
iptables -A INPUT -i lo -j ACCEPT

# 기존 연결 허용
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

# SSH 허용 (22번 포트)
iptables -A INPUT -p tcp --dport 22 -j ACCEPT

# HTTP 허용
iptables -A INPUT -p tcp --dport 80 -j ACCEPT</code></pre>
<hr>
<h2 id="3번-시도-후-차단-설정">3번 시도 후 차단 설정</h2>
<h3 id="✔-규칙-설정">✔ 규칙 설정</h3>
<ol>
<li><p>최근 접속 기록 확인 (3회 이상이면 차단)
iptables -A INPUT -p tcp --dport 22 <br>-m recent --name SSH --update --seconds 60 --hitcount 3 -j DROP</p>
</li>
<li><p>접속 시도 기록 추가
iptables -A INPUT -p tcp --dport 22 <br>-m recent --name SSH --set -j ACCEPT</p>
</li>
</ol>
<hr>
<h3 id="설정은-재부팅-시-초기화됨">설정은 재부팅 시 초기화됨</h3>
<p>iptables는 기본적으로 재부팅하면 사라집니다.</p>
<h4 id="해결-방법">해결 방법:</h4>
<pre><code class="language-bash">iptables-save &gt; /etc/iptables.rules</code></pre>
<p>또는</p>
<pre><code class="language-bash">netfilter-persistent save</code></pre>
<hr>
]]></description>
        </item>
    </channel>
</rss>