Skip to main content

Posts

Showing posts from September, 2017

How to fix apt-get update problem with Hash Sum mismatch (Internet problem)

If you found " apt-get update " problem with official repo from Kali and you try to find solution but failed. You may find this post help. From last day (20 Sep 2017), I would like to install dhcp server on my kali linux but I encounter with " apt-get update " error before as following "Hash Sum mismatch error" "Failed to fetch from mirror list" Although my /etc/apt/sources.list is as picture ( it's correct) I try to fix this issue many way - edit and add new mirror list in repositories in /etc/apt/sources.list - find solution on forums.kali.org and not see anyone have this issue now - apt-get clean - restart but after 2 days, it's still failed. I'm very confused with this problem.  I try to use internet sharing from my mobile 4G instead Home's fiber internet and Got it. Just change Intenet provider only. OMG. Hope this solution can help you. If you stuck with this strange problem. update on 23 Se

พูดถึง MAC ใน ASP.NET

Post นี้แนว def ครับ  เป็น basic เรื่องนึง ที่น่าสนใจครับ เกี่ยวกับการ tamper ข้อมูลครับ จากที่อ่านหนังสือ The Web Application Hacker's Handbook เกี่ยวกับเรื่อง tamper ตัวข้อมูล ใน ASP.NET (หรือตัว ViewState) ซึ่งจะเป็นค่าที่มีการ encode ด้วย base64  แต่ในกรณีที่ผู้โจมตีหรือไม่ประสงค์ดีสามารถ decode ตัว base64 ได้ ก็อาจจะสามารถรู้ข้อมูลที่ส่งผ่านระหว่าง client กับ server ได้ และก็จะสามารถแก้ไขข้อมูลของผู้ส่งได้เช่นกัน ทีนี้  ASP.NET เลยมีกระบวนการที่เรียกว่า MAC ย่อมาจาก Message Authentication Code มาเพื่อจัดการเรื่องนี้ เพราะ MAC เป็นกระบวนการที่จะช่วยยืนยันได้ว่า message ที่ส่งระหว่าง sender กับ receiver นั้นถูกต้องไหม ?  ดูรูปด้านล่างนะครับ  Ref : https://en.wikipedia.org/wiki/Message_authentication_code#Example 1. ดูในกรอบสีฟ้าด้านซ้ายก่อน จะเห็นว่า message ของผู้ส่ง จะถูกทำการ hash ด้วย ด้วย Key(K) ซึ่งเป็น private key ได้ออกมาเป็น MAC สีเขียว  2. การส่งจะส่งทั้ง message เดิม รวมไปกับ MAC  3. เมื่อมาถึงผู้รับ ในกรอบสีเหลืองด้านขวา จะเห็นว่า ผู้รับ จะนำเอา message