Category Archives: Dave’s Tools

Tools – Tools/Script/Code written by Dave

Hacking Valgrind

This post talks about 3 commits I have recently added into my own valgrind tree [1], including the support for fsgsbase instructions, rdrand/rdseed instructions, and adding a new trapdoor (client request) to support gdb-like add-symbol-file command. Note that all these … Continue reading

Posted in Dave's Tools, Programming | Tagged , , , , , , , , , | Leave a comment

Kernel Code Execution Time Measurement (kcetm)

This post mainly talks about the correct usage of tsc counters provided by Intel x86/x86-64 architectures to measure the Linux kernel code execution time. Most of the content here is borrowed/inspired from [1]. Note that this is NOT a post … Continue reading

Posted in Dave's Tools, OS, Programming | Tagged , , , , , , , , | 1 Comment

Making USB Great Again with USBFILTER – a USB layer firewall in the Linux kernel

Our paper “Making USB Great Again with USBFILTER” has been accepted by USENIX Security’16. This post provides a summary of usbfilter. For details, please read the damn paper or download the presentation video/slides from USENIX website. I will head to … Continue reading

Posted in Dave's Tools, OS, Security | Tagged , , , , , , , , , , , | Leave a comment

ksig – sending signals from the kernel space to the user space

While syscall kill() gives users the ability to send certain signal to certain process in the user space of Linux, the story is totally different if we want to send signals from the kernel space to the user space. After … Continue reading

Posted in Dave's Tools, OS, Programming | Tagged , , , | Leave a comment

Parallel PAM – a PAM implementation using Parallel Python

pyCluster is a Python implementation for clustering algorithms, including PAM and CLARA, which are widely used in Data Mining. To better the performance of PAM, parallel PAM is designed and implemented using Parallel Python. The experiment shows that parallel PAM, … Continue reading

Posted in AI/ML, Dave's Tools, Programming | Tagged , , , | 1 Comment

nex – Linux netlink programming for kernel and user spaces

There are ways to communicate with Linux kernel, including /proc, debugfs, syscall and etc. Most of them are unidirectional, from the kernel to the user space. /proc could be used to ‘write’ to the kernel but mostly in small data … Continue reading

Posted in Dave's Tools, OS, Programming | Tagged , , | Leave a comment

fsl – Fedora Security Lab

fsl (Fedora Security Lab) is a customized Fedora OS for security hack/test based Fedora 19. Like the famous BackTrace Linux, fsl has integrated a butch of security tools. To take the advantage of fsl, either security liveCD or all the … Continue reading

Posted in Dave's Tools, OS, Security | Tagged , , , , , | Leave a comment

darp – how to write your own arp command

For certain reasons, I need to refer to the source files of arp cmd. However, been searching on the net for long time and ended up with no luck. Actually, there is a SRPM mirror for Fedora 18, where you … Continue reading

Posted in Dave's Tools | Tagged , , | Leave a comment

pyCluster – Python Clustering

pyCluster is a Python implementation for clustering algorithms, including PAM and Clara. Enjoy! 1. PAM kMedoids – PAM implementation See more : http://en.wikipedia.org/wiki/K-medoids The most common realisation of k-medoid clustering is the Partitioning Around Medoids (PAM) algorithm and is as … Continue reading

Posted in Dave's Tools | Tagged , , , | Leave a comment

pyMns – Python Markov Network Solver

pyMns is a python implementation for Markov Network solver, which read the UAI file (and UAI evidence as well) to do inference with some classical algorithms in Probabilistic Graph Model, including Variable Elimination (VE) and Belief Propagation (BP). Have fun! … Continue reading

Posted in Dave's Tools | Tagged , , , , | Leave a comment