starctf 2019 oob

出題形式

一般瀏覽器的出題有兩種,

一種是diff修改v8引擎源代碼,人爲製造出一個漏洞,

另一種是直接採用某個cve漏洞。

 

一般在大型比賽中會直接採用第二種方式,更考驗選手的實戰能力

 

 

出題者通常會提供一個diff文件,或直接給出一個編譯過diff補丁後的瀏覽器程序。如果只給了一個diff文件,就需要我們自己去下載相關的commit源碼,然後本地打上diff補丁,編譯出瀏覽器程序,再進行本地調試

 

git apply < oob.diff

應用補丁,然後再編譯即可

思路

1 分析漏洞

2 實現任意地址讀寫

3 利用wasm執行shellcode

分析diff

star ctf oob題目舉例

diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index b027d36..ef1002f 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1668,6 +1668,8 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
                           Builtins::kArrayPrototypeCopyWithin, 2, false);
     SimpleInstallFunction(isolate_, proto, "fill",
                           Builtins::kArrayPrototypeFill, 1, false);
+    SimpleInstallFunction(isolate_, proto, "oob",
+                          Builtins::kArrayOob,2,false);
     SimpleInstallFunction(isolate_, proto, "find",
                           Builtins::kArrayPrototypeFind, 1, false);
     SimpleInstallFunction(isolate_, proto, "findIndex",
diff --git a/src/builtins/builtins-array.cc b/src/builtins/builtins-array.cc
index 8df340e..9b828ab 100644
--- a/src/builtins/builtins-array.cc
+++ b/src/builtins/builtins-array.cc
@@ -361,6 +361,27 @@ V8_WARN_UNUSED_RESULT Object GenericArrayPush(Isolate* isolate,
   return *final_length;
 }
 }  // namespace
+BUILTIN(ArrayOob){
+    uint32_t len 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章