Category Archives: Others

Get Root Privileges Using CVE-2017-16995

NOTE: PLEASE DO NOT USE IT TO ATTACK OTHER COMPUTERS. CVE-2017-16995 has been fixed before. But it is broken again in many kernels of Debian and Ubuntu distributions, ranging from version 4.4 to 4.14. It causes an arbitrary memory read/write access issue was found in the Linux kernel compiled with the eBPF bpf(2) system call (CONFIG_BPF_SYSCALL). The issue could occur due to calculation errors in the eBPF verifier module, triggered by user-supplied malicious BPF program. An unprivileged user could use this flaw to escalate their privileges on a system. Setting parameter "kernel.unprivileged_bpf_disabled=1" prevents such privilege escalation by restricting access to bpf(2) call. Steps to Reproduce Create a file named upstream44.c and paste following code to it. Then, compile it and make it executable:…

Continue Reading

Lua in a Nutshell: A Quick Tutorial for Lua

I'm reading source code written with Torch these days. Torch is a well-known deep learning framework written by Lua. So I summarize the grammar of it and provide a quick tutorial here. Run As we know, Lua is a C-like language. Therefore, it is case-sensitive. The following code outputs "Hello World" with Lua. Note that the semicolon at the end of a line is optional, like JavaScript. You can use the interrupter of Lua in the command line: Also, you can run a Lua script with a file in the command line: Grammar Comment Variables The numbers in Lua are all doubles with 64 bits. And you can use following expressions: You can use both double and single quotes for…

Continue Reading

Install QQ/TIM in Linux with Wine

This tutorial introduces how to install QQ/TIM in Linux with Wine, which had been tested on ArchLinux with Wine 2.4. Prerequisites Before start, you need to get the latest Wine. I'm not sure whether QQ/TIM can run on lower version of Wine. In ArchLinux, you can easily get the latest Wine using following command: However, in Debian, you need to install Wine with some more steps. You can see this tutorial. Then, you need to install a helper of Wine, Winetricks. Winetricks is a script to download and install various redistributable runtime libraries needed to run some programs in Wine. To install Winetricks, you can use following command: After that, we need to fix some problems manually caused by Winetricks. According…

Continue Reading

Setup Raspbian on Raspberry Pi

This resource explains how to install Raspbian operating system and setup a Raspberry Pi. You will need another computer with an SD (or MicroSD) card reader to install the image. Install Raspbian Download the Image Raspbian is the Raspberry Foundation’s official supported operating system and can be download from Raspberry Pi website Downloads page. After downloading the .zip file, unzip it to get the image file (.img) for writing to your SD card. And you can write this image to SD card with the help of Win32 Disk Imager in Windows. Setup for HDMI Output Once the write is complete, edit config.txt in boot partition as following for HDMI output. Once you’ve steps above, place the SD card into your Raspberry…

Continue Reading

April Fools Pranks with a Squid Proxy Server

Introduction Note: This guide was tested using Ubuntu Server 14.04.4 LTS. This is a HowTo for setting up Upside-Down-Ternet on Ubuntu. Basically, when a user browses the web, all the images are flipped upside-down. While it's not useful, it's quite a good April Fool's prank. The process uses a transparent proxy, web server, and script to flip the images. Web traffic is routed to the proxy, instead of the default gateway, which is intercepted by the proxy which then downloads and modifies the images and then serves them back to the client browser. Setting up the Proxy The proxy used in this guide is Squid v3.3.8. The IP of this server is 192.168.113.253. Installation Configuration Edit the configuration file located in…

Continue Reading

Signing commits using GPG in Git

Git is cryptographically secure, but it’s not foolproof. If you’re taking work from others on the internet and want to verify that commits are actually from a trusted source, Git has a few ways to sign and verify work using GPG. Introduction to GPG First of all, if you want to sign anything you need to get GPG configured and your personal key installed. If you don’t have a key installed, you can generate one with gpg --gen-key. Once you have a private key to sign with, you can configure Git to use it for signing things by setting the user.signingkey config setting. Now Git will use your key by default to sign tags and commits if you want. Add…

Continue Reading
Contact Us
  • Room 614, Zonghe Building, Harbin Institute of Technology
  • cshzxie [at] gmail.com