Thursday, October 16, 2014

How to fix Live Http header can't replay on Firefox 32.0.x

1. Download file:
http://rghost.net/58012556
2. Drag and drop it to about:addons (extensions Firefox page)
3. Install and restart Firefox

Monday, October 6, 2014

How to fix Ubuntu 12.04 can't load to GUI (Vmware 9.0)

After installed Ubuntu 12.04 (x86) on Vmware 9.0 and reboot. It can't load to GUI with black screen. How to fix it?
Go to VM -> Setttings -> Display-> Uncheck 3D graphic and reboot your Virtual machine.

Sunday, September 28, 2014

Stegano+ forensic tool + link note:

Stegano tool:
1. outguess ( giấu, lấy lại dữ liệu trong các bit dư thừa của dữ liệu)
sudo apt-get install outguess
outguess -r abc.jpg output.txt
examle: http://linuxpoison.blogspot.com/2010/08/how-to-hide-data-steganography-into.html
Forensic tool default on kalinux :
1. Recover delete file from disk image file:
https://ctftime.org/writeup/1209
2. Audio file analyzer
sonic-visualiser + audacity
http://hyp3rn0vax.blogspot.com/2014/09/su-ctf-2014-hear-with-your-eyes-write-up.html
Classic crypto trick:
1. Poem code
http://hyp3rn0vax.blogspot.com/2014/09/su-ctf-2014-decrypt-message.html
http://www.slideshare.net/derekbruff/poem-codes
Re trick:
ASPacker:
http://hyp3rn0vax.blogspot.com/2014/09/su-ctf-2014-reverse-me-write-up.html

Monday, September 8, 2014

Hướng dẫn cài gdb peda script

OS: ( Ubuntu 14.04 LTS x64)
1. Kiểm tra gdb python compiler
gdb
python print(sys.version)
2.7.6 (default, Mar 22 2014, 23:03:41)
Do Peda chưa hỗ trợ python 3.x nên nếu hiện lên 3.x thì phải gỡ bỏ gdb và cài lại
sudo apt-get remove gdb
2. Cài đặt gdb
sudo apt-get install libncurses5-dev
Download gdb từ : ftp://sourceware.org/pub/gdb/releases/ ( mình sử dụng bản 7.7)
./configure --with-python2
make
sudo make install
3. Cài đặt peda:
wget http://ropshell.com/peda/peda.tar.gz
tar -xvf peda.tar.gz
- copy peda vào HOME directory
$ echo "source ~/peda/peda.py" >> ~/.gdbinit
Chạy gdb và tận hượng. Enjoy :]

Saturday, September 6, 2014

PicoCTF2013 writeup

PicoCTF2013 writeup:
Đây là một ctf khá cơ bản cho CTF beginner.
Chú ý: 
Hình như mỗi một user một số bài flag sẽ bị thay đổi, không thể copy flag bên dưới để submit trực tiếp được.
Link : https://picoctf.com/
OK, let's go.

Problem : Failure to Boot
Google với keyword "ERROR: 0x00000023".
Mã lỗi này xuất hiện khi entries FAT file system bị thay đổi không chính xác
Flag: FAT_FILE_SYSTEM
Problem : XMLOL
Link file XML đề bài : 
https://picoctf.com/autoproblems/tmpPoc4IM.xml
Truy cập link bằng trình duyệt nào đó( ff, chrome,..) bấm ctrl + U để view source. 
<super_secret_flag>53602162025324853841232713368</super_secret_flag>
Flag:53602162025324853841232713368
Problem: Read the Manual
Một đoạn văn bản bị encode hoặc encrypt ở link:
https://picoctf.com/autoproblems/tmpG70Prv.txt
Nhận xét :
Nhìn qua, ta có thể nhận xét ngay đây là một dạng mã thay thế, có thể được giải quyết bằng phương pháp
"alphabet frequency analysis" google plz.
Giờ không ai còn ngồi mò mẩm để tính ra từng ký tự nữa. CrypTool 2.0 sẽ giúp chúng ta (sử dụng module : Monoalphabetic Substitution Analyzer)
Flag: dgoqkuvxxiur
Problem : Technician Challenge
Google keyword "For what kind of car was the first unlocked iPhone traded"
Flag: Nissan 350Z
Bonus: Anh chàng George Hotz khá thú vị, các bạn có thể tìm google thêm thông tin về người này. Một hacker tài năng, là  người đầu tiên bẻ khóa iPhone của Apple(2007) khi mới 17 tuổi( được Apple thưởng cho em Nissan 350Z trên), bẻ khóa thành công bộ điều khiển của PS3(2010) và bị Sony kiện. Anh này là thành viên duy nhất của team tomcr00se đang đứng ở vị trí số 5 trên bảng xếp hạng của ctftime.org/
Problem : Spaceport Map
Một cái ảnh gif ở link : https://picoctf.com/problems/spaceportmap.gif
Khi dê chuột vào bất cứ 1 điểm nào đó, dòng text ở bên dưới chạy và ta có thể nhìn thoáng qua có chữ key... tuy nhiên nó chạy nhanh ta không kịp nhìn. Ok, một công cụ online giúp ta view được từng frame của gif file:
http://gif-explode.com/
Flag: Do passports let you fly interstellar?
Continue...
Problem : Bitwise
http://pastebin.com/kKzaX05V
Flag: ub3rs3cr3t
Problem: Byte Code
Java class decompiler online website:
http://showmycode.com/
Problem : Client-Side is the Best Side 
Link chứa flag nằm chình ình trong java script code.
https://picoctf.com/problems/aebe515f7c62b96ad7de047c11aa3228.html
Flag :  cl13nt_s1d3_1s_w0rst_s1d3
Problem : DDoS Detection
Filter : https://www.cloudshark.org/captures/88971318a309?filter=tcp.flags.syn ==1 and tcp.flags.ack ==0
lưu lại thành file ip.txt và chuyển các ip tấn công vào một set( tập hợp ) trong python để loại bỏ các ip trùng.
 http://pastebin.com/9SfyNy4U


Monday, July 7, 2014

Cài đặt công cụ AuditConsole để phân tích log audit của mod_security( công cụ phân tích log giao diện web)

Os: Ubuntu server 64bit 14.04
Hướng dẫn bằng tiếng anh:
https://secure.jwall.org/AuditConsole/user-guide/
Bước 1: 
Download :
https://secure.jwall.org/web/audit/console/download.jsp
Mình chọn bản:
AuditConsole-0.4.1-standalone.zip
Ok. Sau khi download xong giải nén và cp thư mục AuditConsole vào thư mục /opt
sudo mv AuditConsole /opt/AuditConsole
Bước 2: 
Cài các gói cần thiết và run một số command :]:
sudo apt-get update
sudo apt-get install default-jre
sudo apt-get install default-jdk

sudo apt-get install mysql-server
mysqladmin -u root -p create AuditConsoleDB
mysql -u root -p AuditConsoleDB
GRANT ALL ON AuditConsoleDB.* to wacUser@localhost IDENTIFIED BY 'wacPassword';
FLUSH PRIVILEGES;
mysql -u wacUser -p AuditConsoleDB
mysql -u wacUser -p -h database-host AuditConsoleDB
cd  /opt/AuditConsole/bin
chmod +x *.sh
Download unzip mysql-connector-java-5.1.10.zip hoặc bản mới nhất về(google please)

unzip mysql-connector-java-5.1.10.zip
cp mysql-connector-java-5.1.10/mysql-connector-java-5.1.10.jar /opt/AuditConsole/lib/
cd /opt/AuditConsole
sudo ./catalina.sh start
Địa chỉ web mặc định sẽ là :
https://ip:8443
User: admin, admin
Lần đầu cấu hình cứ bấm next cho đến bước cấu hình thông số database thì điền như sau:
URL: jdbc:mysql://localhost:3306/AuditConsoleDB
User: wacUser
Password: wacPassword
Ok. Muốn upload file log để phân tích thì vào menu Event-> Upload


Wednesday, June 25, 2014

Hướng dẫn cấu hình remote debug ( IDA pro 6.1, target: ubuntu 14.04 x64)

Debug file elf 32bit.
Copy file linux_server vào máy ảo ubuntu. Chạy file này
./linux_server
sẽ báo lỗi :
./linux_server: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
Cài thêm gói sau:
sudo apt-get install lib32stdc++6
Sau đó chạy bình thường.
Copy file cần debug vào máy cài IDA 6.1 và open file này bằng IDA
Vào debugger -> Select a debugger -> Remote Linux debugger -> OK
Tiếp tục vào Debugger ->Process options
Appilication : Đường dẫn tới file debug trên server Ubuntu (/home/f2_ubuntu_x64/ctf/elf1.bin)
Input file : Giống trên
Directory : Bỏ phần tên file :  /home/f2_ubuntu_x64/ctf/
Parameters : tham số ( tùy chọn)
Hostname: ip của Ubuntu server
Ok.
Chú ý: kiểm tra lại đường dẫn ( dấu cách,..) firewall của cả 2 máy ....