Trickster is a simple application built on UsbThumb platform. It tricks your victim into thinking they have a virus on their computer, by hardware emulating and moving their mouse in circles on intermittent intervals.

It is basically a customization of Mouse emulation demo that Microchip bundles with their USB Framework.

The code responsible for enabling/disabling mouse emulation is triggered by a timer interrupt like so:

        OpenTimer0( TIMER_INT_ON &
                 T0_16BIT              &
                 T0_SOURCE_INT         &


        //These are your actual interrupt handling routines.


        #pragma interrupt YourHighPriorityISRCode
        void YourHighPriorityISRCode()
                //Check which interrupt flag caused the interrupt.
                //Service the interrupt
                //Clear the interrupt flag
        #if defined(USB_INTERRUPT)
                        //to interrupt every 1s we need to count FOSC / 4/ 256  = 46875 ticks (0xB71B)
                        //to count these ticks till overflow we need to set TMR0 to  0xFFFF – 0xB71B = 0x48E4
                        TMR0H = 0x48; //will write to TMR0H buffer
                        TMR0L = 0xE4; //will write actual TMR0L / TMR0H 

                        INTCONbits.TMR0IF = 0;

        }       //This return will be a "retfie fast", since this is in a #pragma interrupt section


       INTCONbits.TMR0IE = 0;  //disable Timer0 interrupt
        if(emulate_mode && counter_s > 3){      // seconds on
                counter_s = 0;
                emulate_mode = 0;
        }else if (!emulate_mode && counter_s > 60){     //seconds off
                counter_s = 0;
                emulate_mode = 1;
        INTCONbits.TMR0IE = 1;


For full source code see:

UsbThumb is an open-hardware platform, anyone can build their own:

or pick up a prebuilt SMT version of UsbThumb here: