Skip to main content

Posts

Showing posts with the label javascript

Vọc thử các ứng dụng ngân hàng trực tuyến

Nhân dịp vấn đề an toàn giao dịch ngân hàng trực tuyến đang nóng, mình làm một vài bài thử nghiệm với các dịch vụ của 5 ngân hàng lớn trong nước: BIDV, Vietcombank, ACB, Techcombank và Sacombank. Các bài thử nghiệm sẽ là ( hoặc tua xuống cuối bài để xem nhanh nên xài ngân hàng nào thì an toàn :P ): Trang web TLS: phải bật SSL Server Test : phải từ A trở lên HPKP : phải sử dụng hoặc phải mã hóa tên và mật khẩu bằng Javascript trước khi đăng nhập Ứng dụng di động: lúc đầu mình tính kiểm tra riêng Android và iOS nhưng thực tế thấy ứng dụng mỗi ngân hàng ở hai nền tảng khá giống nhau nên gom lại chung cho gọn TLS: phải sử dụng Certificate/Public Key Pinning : phải sử dụng hoặc phải mã hóa tên và mật khẩu đăng nhập Giới thiệu TLS trước đây còn có rào cản về chi phí tuy nhiên gần đây đã có chứng chỉ miễn phí từ Let's Encrypt nên không còn lý do gì nữa để không làm việc này. TLS là bước cơ bản nhất để bảo mật thông tin giữa ngân hàng và người sử dụng. SSL Server T...

My experiment with golang and social counters

Starting with my frustration while building the scroll  website: the social buttons are freaking slow to load. Especially on pages that has a lot of scripts (like mine) it is way worse. The buttons usually take minutes to show up and when they do, each of them render differently from the rest. Thanks Facebook, Twitter and Google for that. So I went in and found a few options. It looks like people made a few scripts that will collect the counters via AJAX (on user browser) and render the buttons with images. Some use data URI to avoid triggering more requests, brilliant! Since I wanted to make something super simple and fast to use, I decided to have one script that does all of those. The server will keep track of the counters and put them in the script so everything needed is one and only one request. I needed 3 social networks and each of them has different ways to retrieve the counters so I figured the server has to make the requests asynchronously, cache the values for ...

Cảnh báo kẻ xấu lợi dụng Clickjacking extension để tạo "botnet"

Hôm nay có người bạn hỏi về extension có tên "Clickjacking Detect" trên "Chrome Web Store" có chức năng rất giống extension của mình ... Nghĩ là có bạn nào đó thấy mã nguồn của mình ở github  nên cũng tạo và đăng extension dưới tên của họ để quảng cáo. Tuy nhiên cũng thấy hơi nghi nên đã tải về kiểm tra và phát hiện ra ngoài đoạn mã detect Clickjacking giống hệt extension của mình còn có một đoạn JavaScript chèn vào ... Hoạt động của extension này như sau: Hiển thị các iframe ẩn clickjacking theo phương pháp của mình (vỏ bọc) Nếu địa chỉ của trang đang xem có đoạn "facebook.com" thì sẽ bắt đầu hành vi xấu Tải về lệnh điều khiển từ địa chỉ http://cuchay.tv/hay.php?pageid=1 Thực thi mã lệnh tải về nếu có. Hiện tại với thông tin trả về từ server thì sẽ thực hiện 2 hành vi: Like một trang Facebook có tên "SaoKlub" (id 264357593705349) Like một ảnh trên Facebook Ảnh này thuộc một album của page "SaoKlub" ở trên, nằm...

Nghi vấn CHAOBUOISANG.NET; Hãy là người sử dụng Facebook thông thái

Cập nhật ngày 1/11/2013: Đã có hỗ trợ phát hiện các trang lừa đảo cho trình duyệt Google Chrome, Apple Safari và Mozilla Firefox. Xem ở cuối bài. Cập nhật ngày 30/11/2 013: Cảnh báo kẻ xấu lợi dụng Clickjacking extension để tạo "botnet" . Hôm nay đột nhiên thấy một số lượng lớn bạn của mình trong Facebook like một bài viết ở trang CHAOBUOISANG.NET, mà lại đúng một bài mình vừa đọc cách đây ít phút... Kiểm tra lại activity trong Facebook thì phát hiện ra chính tài khoản của mình cũng đã like bài viết đó. Có vẻ có nghi vấn nên đã mở Google Chrome Inspector và kiểm tra lại nhưng không có kết quả gì. Dự đoán là có đoạn mã nào đó tự bảo vệ chống bị phát hiện nên mình đã tạo Profile mới trong Google Chrome, đăng nhập vào một tài khoản Facebook khác để thử lại. Lần này thì phát hiện ra một iframe ẩn chạy theo con trỏ chuột đúng như dự đoán: Sau khi kiểm tra kĩ hơn thì đoạn mã sinh ra iframe này nằm trong file /js/common_load.js , ý tưởng cơ bản như sau: Tạo một thẻ div vớ...

WOWZAPP 2012 Post-moterm

So I participated in WOWZAPP 2012 hackathon event in Hanoi , failed to win but nonetheless had fun. Below are some tips, writing down for the next time I go to a hackathon: If you have the chance to join a hackathon, do it! Big plus if you are young (not to say the events are not for old people). Project choice: do not build something that relies heavy on network connection. It's okie if the product uses a server but during development you should be able to put in some stub data for it to work. No matter how many wifi APs, the connection at a hackathon will be slow and troublesome, expect a lot of lost packets. Yesterday our team built a collaboration drawing app -- big mistake! We have to repeatedly perform this routine: find an available network, join it (do this at least 2 times for one client machine and one server machine), run "ifconfig en1" to get server address, put the new address in client config, run. Drove us crazy! If you have to, BYO router. We planned t...

Announcing Vietnames Input Method for XenForo

(tiếng Việt ở dưới) Today I'm announcing the release of Vietnamese Input Method for XenForo as an extremely easy to use add-on. The add-on package can be downloaded here:  xfrocks.com The source is available also on github. The source tree is merged from the  mudim Google Code tree This add-on does not just insert a simple <script /> tag into every page of your site. It went far than that and create a few additional option in account/preferences page so logged in users will be able to configure their typing preferences once and for all (so if a user uses multiple machine, it still works as expected). **** Add-on này tích hợp bộ gõ mudim cho XenForo. Hỗ trợ trình soạn thảo WYSIWYG trên máy tính để bàn cũng như trình soạn thảo chuẩn cho các thiết bị di động (Android, iOS,...). Sau khi cài đặt thành viên có thể vào trang account/preferences để cấu hình bộ gõ theo mong muốn, các lần đăng nhập sau hệ thống sẽ tự động cấu hình bộ gõ (như vậy nếu có ai sử dụng nhi...

Keyboard Shortcut for vBulletin

It started from a night (like tonight) when I'm reading a lengthy thread some where and then when I wanted to go to the next page, I pressed K just like in Gmail when I want to go to next conversation. But unfortunately, it didn't go to the next page. Well, I thought for a moment then decided to do this: Keyboard Shortcut for vBulletin (both version 3 and version 4 ). I hope someday I can use keyboard shortcuts with my favourite sites, in my favourite threads. Uh oh. Some screenshots: Firefox. vBulletin 4. Forum display page Google Chrome. vBulletin 4. Album page Safari. vBulletin 4. Picture page And of course, Internet Explorer. vBulletin 3. Forum display page (again)