<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>masami256</author_name>
  <author_url>https://blog.hatena.ne.jp/masami256/</author_url>
  <blog_title>φ(・・*)ゞ ｳｰﾝ　カーネルとか弄ったりのメモ</blog_title>
  <blog_url>https://kernhack.hatenablog.com/</blog_url>
  <categories>
    <anon>exploit</anon>
  </categories>
  <description>最近CTFとか興味出てきたので色々と遊んでます。 今回はOverTheWire: Narniaのレベル7の問題(narnia7.c)を元にformat string attackのメモです。 narnia7の脆弱性のある関数はこれです。formatはmain関数においてはargv[1]で参照されていたもので、ユーザーからの入力がそのままsnprintf(3)に渡ります。 int vuln(const char *format){ char buffer[128]; int (*ptrf)(); memset(buffer, 0, sizeof(buffer)); printf(&quot;goodfun…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkernhack.hatenablog.com%2Fentry%2F2016%2F11%2F24%2F235551&quot; title=&quot;format string attackめも - φ(・・*)ゞ ｳｰﾝ　カーネルとか弄ったりのメモ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/m/masami256/20161124/20161124233630.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-11-24 23:55:51</published>
  <title>format string attackめも</title>
  <type>rich</type>
  <url>https://kernhack.hatenablog.com/entry/2016/11/24/235551</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
