<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Rcecode.com</title>
	<atom:link href="http://www.rcecode.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rcecode.com/blog</link>
	<description>Reverse code engineering website in Thailand :: Crack is my kungfu</description>
	<lastBuildDate>Thu, 19 May 2011 05:39:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>start debug with gdb</title>
		<link>http://www.rcecode.com/blog/2011/05/19/start-debug-with-gdb/</link>
		<comments>http://www.rcecode.com/blog/2011/05/19/start-debug-with-gdb/#comments</comments>
		<pubDate>Thu, 19 May 2011 05:38:03 +0000</pubDate>
		<dc:creator>Edkung</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[gdb]]></category>

		<guid isPermaLink="false">http://www.rcecode.com/blog/?p=1400</guid>
		<description><![CDATA[gdb คือ debugger โดยปกติ programmer จะใช้สำหรับช่วยในการแก้ bug ด้วยการดูค่าของตัวแปรต่างๆ ที่บรรทัดต่างๆ ของ code แต่ในมุมมองของ hacker ตัว debugger นั้น ช่วยให้เข้าใจโปรแกรม และช่องโหว่ของโปรแกรม และเราจะได้ใช้ gdb ไปตลอด tutorial นี้ โดยหัวข้อนี้ ผมตั้งใจให้คนที่ไม่เคยใช้ gdb ได้เห็นคำสั่งต่างๆ และได้ลองนิดหน่อย (ไม่ต้องให้คล่องนะครับ ต้องได้ใช้อีกเยอะ เดี๋ยวก็จำได้เอง) ก่อนจะ เริ่ม debug ก็ต้องสั่ง gdb แล้วเราจะเข้าไปในอยู่ใน gdb แล้วสั่งคำสั่งเพื่อตรวจสอบ process ได้ โดย gdb มีรูปแบบของ parameter ที่สำคัญตามนี้ # debug โปรแกรม prog $ gdb ./prog # ตรวจสอบ [...]]]></description>
		<wfw:commentRss>http://www.rcecode.com/blog/2011/05/19/start-debug-with-gdb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>function and stack</title>
		<link>http://www.rcecode.com/blog/2011/05/17/function-and-stack/</link>
		<comments>http://www.rcecode.com/blog/2011/05/17/function-and-stack/#comments</comments>
		<pubDate>Tue, 17 May 2011 05:15:18 +0000</pubDate>
		<dc:creator>Edkung</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[assembly]]></category>
		<category><![CDATA[calling convention]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[stack]]></category>

		<guid isPermaLink="false">http://www.rcecode.com/blog/?p=1383</guid>
		<description><![CDATA[คราวนี้ผมจะพูดถึงการ call (เรียก) function หนึ่ง จะมีผลอย่างไรกับ memory ในส่วน stack และจะมีคำสั่ง assembly อะไรบ้างที่เกี่ยวข้อง ปกติโปรแกรมจะทำงานเป็นลำดับ โดยมี eip ชี้ไปคำสั่งที่จะถูกประมวลผล แต่เมื่อมีการ call function หนึ่ง eip จะกระโดดไปทำงานใน function ใหม่ และเมื่อทำงานใน function ใหม่จบแล้ว eip จะต้องกระโดดกลับมาทำงานที่ function เดิมต่อ แล้วโปรแกรมรู้ได้อย่างไรละว่า eip ต้องกระโดดกลับไปที่ไหน? เพื่อให้ eip ชี้ไปที่คำสั่งถัดไปหลังจากกลับมาจาก function ที่เรียก คำสั่งที่ใช้ในการ call function คือ &#8220;call&#8221; (เช่น &#8220;call printf&#8221;) จะทำการ &#8220;push eip&#8221; ลงไปใน stack ก่อน แล้วค่อยกระโดดไปทำงานที่ function [...]]]></description>
		<wfw:commentRss>http://www.rcecode.com/blog/2011/05/17/function-and-stack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>basic assembly</title>
		<link>http://www.rcecode.com/blog/2011/05/14/basic-assembly/</link>
		<comments>http://www.rcecode.com/blog/2011/05/14/basic-assembly/#comments</comments>
		<pubDate>Sat, 14 May 2011 05:45:08 +0000</pubDate>
		<dc:creator>Edkung</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[assembly]]></category>
		<category><![CDATA[cpu]]></category>
		<category><![CDATA[exploit]]></category>
		<category><![CDATA[register]]></category>

		<guid isPermaLink="false">http://www.rcecode.com/blog/?p=1368</guid>
		<description><![CDATA[cpu registers ใน cpu จะมี registers ต่างๆ ขนาด 32 bits ที่ใช้เก็บข้อมูล สำหรับ alu (arithmetic logic unit) นำมาประมวลผล โดยมี register ที่สำคัญ มีดังนี้ eip (extended instruction pointer) ใช้สำหรับเก็บ address ของคำสั่งถัดไปที่จะถูกประมวลผล ebp (extended base pointer) ใช้สำหรับเก็บ address ล่างสุดของ frame ที่ทำงานอยู่ใน stack esp (extended stack pointer) ใช้สำหรับเก็บ address บนสุดของ stack eax (extended accumulator register), ebx (extended base register), ecx [...]]]></description>
		<wfw:commentRss>http://www.rcecode.com/blog/2011/05/14/basic-assembly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>process memory layout on linux x86</title>
		<link>http://www.rcecode.com/blog/2011/05/14/process-memory-layout-on-linux-x86/</link>
		<comments>http://www.rcecode.com/blog/2011/05/14/process-memory-layout-on-linux-x86/#comments</comments>
		<pubDate>Sat, 14 May 2011 05:26:57 +0000</pubDate>
		<dc:creator>Edkung</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[endian]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[stack]]></category>

		<guid isPermaLink="false">http://www.rcecode.com/blog/?p=1361</guid>
		<description><![CDATA[ในแต่ละ process จะมีการจอง memory ไว้ใช้งาน โดยทุก process จะเห็น memory เป็นโครงสร้างเดียวกันทั้งหมด หรือที่เรียกว่า virtual memory (หน่วยความจำเสมือน) และ memory จะมีการแบ่งส่วนไว้เก็บข้อมูลต่างๆ โดยผมจะพูดถึงส่วนที่สำคัญ ตามรูปข้างล่าง (ถ้าใครไม่รู้ว่า virtual memory ก็คิดซะว่าเป็น memory ไปก่อน แต่ถ้าสนใจ แนะนำให้ไปอ่านหนังสือพวก operating system) .text ส่วนนี้ใช้สำหรับเก็บ code ของโปรแกรมที่แปลงเป็น machine code แล้ว โดย default ส่วนนี้จะเป็น read-only (อ่านได้อย่างเดียว) ไม่สามารถเขียนทับได้ .bss ส่วนนี้ตัวแปร global ที่มีการ initialize (ถูกกำหนดค่าไว้ตั้งแต่โปรแกรมเริ่ม) เช่น int a = 0; .data ส่วนนี้ตัวแปร [...]]]></description>
		<wfw:commentRss>http://www.rcecode.com/blog/2011/05/14/process-memory-layout-on-linux-x86/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>what is buffer overflow</title>
		<link>http://www.rcecode.com/blog/2011/05/13/what-is-buffer-overflow/</link>
		<comments>http://www.rcecode.com/blog/2011/05/13/what-is-buffer-overflow/#comments</comments>
		<pubDate>Fri, 13 May 2011 10:13:39 +0000</pubDate>
		<dc:creator>Edkung</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[buffer overflow]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.rcecode.com/blog/?p=1357</guid>
		<description><![CDATA[ในทางโปรแกรมมิ่ง buffer หมายถึง memory ที่จองไว้ สำหรับทำงานต่างๆ เช่น รับข้อมูลจากผู้ใช้ ใส่ข้อมูลเก็บชั่วคราว buffer overflow ก็คือ การใส่ข้อมูลใน buffer เกินที่จองไว้ เช่นเราได้กำหนดขนาด buffer ไว้ 8 bytes แต่เราใส่ข้อมูลไป 12 bytes buffer overflow เป็นปัญหาหนึ่งในเรื่อง security โดยในเริ่มต้น จะยกตัวอย่างที่ง่ายๆ C++# ex_01_1.c &#160; #include &#60;stdio.h&#62; #include &#60;string.h&#62; &#160; int main&#40;int argc, char **argv&#41; &#123; int magic = 0; char buf&#91;8&#93;; &#160; printf&#40;&#34;Before strcpy: magic is 0x%08x\n&#34;, [...]]]></description>
		<wfw:commentRss>http://www.rcecode.com/blog/2011/05/13/what-is-buffer-overflow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

