原创 使用C++產生32位隨機數

提到生成隨機數,大多數人想到的是調用C++中的rand()函數,但是這裏有個問題,rand()只能產生0~RAND_MAX(如在Visual Studio 2010上面最大爲0x7FFF,即32767), 如果需要產生的隨機數範圍是0~

原创 脫殼的常用方法

什麼是殼 大家應該先明白“殼”的概念。在自然界中,我想大家對"殼"這東西應該都不會陌生了,植物用它來保護種子,動物用它來保護身體等等。同樣,在一些計算機軟件裏也有一段專門負責保護軟件不被非法修改或反編譯的程序。它們一般都是先於程序運行,

原创 警告被視爲錯誤 - 沒有生成“object”文件

在使用vs編譯程序的時候碰到如標題所示的錯誤提示,網上找的方法都不好使,後來發現就是簡單的函數返回值不匹配問題。 舉例如下: HANDLE PsGetProcessId( _In_ PEPROCESS Process ); PsGet

原创 HTTPS原理

HTTPS  = HTTP + SSL/TLS,現在一般都使用TLS. HTTPS工作過程如下: 1. 瀏覽器向服務器發送HTTPS請求,該請求中包含一個密文族,該族即爲瀏覽器所支持的加密算法清單; 2. 服務器從該清單中選擇一種非對稱加

原创 使用inf文件安裝文件系統驅動程序的三種方式

After you have created an INF file, you can use it to install, upgrade, and uninstall your file system filter driver. Y

原创 ExploitExercises_Nebula_Level08

題目提供了一個capture.pcap文件: 可以看到password部分輸入,其中包括幾處0x7F,查詢ascii表,該值對應刪除操作。 還原刪除過程,最終得到密碼:bacjd00Rmate su - flag08嘗試登陸,成功。

原创 ExploitExercises_Nebula_Level14

/home/flag14/flag14是一個加密程序,輸入加-e參數,該程序將對輸入數據加密後輸出到終端: level14@nebula:~$ /home/flag14/flag14 -e 123456 13579; 逆向加密算法:

原创 ExploitExercises_Nebula_Level10

題目源碼: #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <stdio.h> #include <fcntl.h> #include <e

原创 ExploitExercises_Nebula_Level13

題目源碼中省略了token的計算過程: #include <stdlib.h> #include <unistd.h> #include <stdio.h> #include <sys/types.h> #include <string

原创 ExploitExercises_Nebula_Level12

程序源碼爲lua腳本: local socket = require("socket") local server = assert(socket.bind("127.0.0.1", 50001)) function hash(pas

原创 ExploitExercises_Nebula_Level06

題目如下: The flag06 account credentials came from a legacy unix system. To do this level, log in as the level06 account wi

原创 ExploitExercises_Nebula_Level04

題目源碼如下: #include <stdlib.h> #include <unistd.h> #include <string.h> #include <sys/types.h> #include <stdio.h> #include

原创 ExploitExercises_Nebula_Level09

題目給出一段PHP代碼: <?php function spam($email) { $email = preg_replace("/\./", " dot ", $email); $email = preg_replace(

原创 ExploitExercises_Nebula_Level07

題目源碼爲一段perl腳本: #!/usr/bin/perl use CGI qw{param}; print "Content-type: text/html\n\n"; sub ping { $host = $_[0];

原创 Ubuntu 16.04網絡配置

安裝完Ubuntu 16.04後,配置靜態網絡: vim /etc/network/interfacesauto eth0 iface eth0 inet static address x.x.x.x netmask x.x.x.x g