Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Hans-Peter Diettrich Newsgroups: sci.electronics.design Subject: Re: OT: Virus infection mechanisms Date: Mon, 02 May 2016 04:38:15 +0200 Lines: 30 Message-ID: References: <5722923a$0$44338$c3e8da3$aae71a0a@news.astraweb.com> <57231407$0$46649$c3e8da3$e074e489@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net whyTBFTlS2SQ0RiUr5/JNAC4rvg7ZqLMUGqhLWz+93NX+ODGRf Cancel-Lock: sha1:7h3cs0nShA3z126DVZR1O2Ac98g= User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: Xref: csiph.com sci.electronics.design:410181 Don Y schrieb: > On 4/29/2016 3:36 AM, Hans-Peter Diettrich wrote: >> PE program files come with verbose names of system calls in their >> fixup tables, >> so that it's easy to find useful locations in such a file. > > From what I've managed to find, it seems like the easiest way is just > to insert a stanza *before*[1] control is transferred to main() that > delivers the payload and then JUMPS to main. It's easy to change the program entry point to somewhere in appended code, but a start address near the end of the code segment is quite easy to detect. The viral code then also cannot access anything that is initiated in the startup code, like memory management and standard handles. The code also will have to call OS routines for connecting to the outer world, which may deserve some setup before they can be used. > I'll drag out a disassembler and see what sort of "nonsense" it encounters. Right, that would be nice to know. > [1] Of course, the position of the inserted "code" in the file can actually > be AFTER the end of the original file as this makes it easier to glob onto > an existing file without having to rewrite it in its entirety. Less effort > required to chase down "where" to inject the patch. Right. DoDi