xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Tamas K Lengyel <tamas.lengyel@zentific.com>
To: "Mihai Donțu" <mdontu@bitdefender.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH 0/3] xen: add support for skipping the current instruction
Date: Tue, 9 Sep 2014 20:58:48 +0200	[thread overview]
Message-ID: <CAErYnsjARLfpXA+AHi14X4tppR-uTSo_MYK3_9miTH9MN07vog@mail.gmail.com> (raw)
In-Reply-To: <20140909200031.764b5228@bitdefender.com>


[-- Attachment #1.1: Type: text/plain, Size: 1351 bytes --]

> Leaving open why terminating the in-guest process requires advancing
> > its IP then, if all other register updates are unnecessary. A huge chunk
> > of source code like this needs - I think - a little more of a rationale
> than
> > some exotic, only partially explained use case.
>
> Essentially, instruction skipping is an alternative to
> 'emulate-no-write'. All it offers is a speed boost, which is noticeable
> when, for example, the emulator is walking a piece of code located into
> an NX-marked memory area (stack, for example). With emulation, it takes
> a long time for an application which has been exploited to terminate
> (some types of malware try in a forever-loop to write to the memory
> areas they target).
>

I wonder what the point is in skipping over the code of some code malware
has put on the stack? Wouldn't it likely just end up crashing afterwards
anyway? If your goal is to terminate the offending application, you could
just simply point the process' RIP to a known invalid location to cause an
immediate crash.. If you need to terminate the process cleanly, then you
could use some OS specific knowledge to redirect the execution of the
process, like update RIP to ExitProcess on Windows for example. Of course,
depending on the threat model that may not be acceptable (ExitProcess may
be hooked as well, etc.).

Tamas

[-- Attachment #1.2: Type: text/html, Size: 1720 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

      reply	other threads:[~2014-09-09 18:58 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-09  2:22 [PATCH 0/3] xen: add support for skipping the current instruction Mihai Donțu
2014-09-09  2:28 ` [PATCH 1/3] x86: add support for computing the instruction length Mihai Donțu
2014-09-09  8:47   ` Mihai Donțu
2014-09-09  9:44     ` Mihai Donțu
2014-09-09 10:13       ` Masami Hiramatsu
2014-09-09 15:46         ` Mihai Donțu
2014-09-09 16:01           ` Mihai Donțu
2014-09-09 16:25             ` Jan Beulich
2014-09-09 17:14               ` Andrew Cooper
2014-09-09 17:27               ` Mihai Donțu
2014-09-09 17:57               ` Konrad Rzeszutek Wilk
2014-09-09  2:29 ` [PATCH 2/3] x86/hvm: implement hvm_get_insn_length() Mihai Donțu
2014-09-09  2:32 ` [PATCH 3/3] xen/tools: script for automatically adjusting the coding style to xen style Mihai Donțu
2014-09-09 14:50   ` Ian Campbell
2014-09-09 15:00     ` Andrew Cooper
2014-09-09 19:52     ` Tim Deegan
2014-09-10 10:59     ` Don Slutz
2014-09-10 14:21   ` Don Slutz
2014-09-09  9:47 ` [PATCH 0/3] xen: add support for skipping the current instruction Jan Beulich
2014-09-09 17:00   ` Mihai Donțu
2014-09-09 18:58     ` Tamas K Lengyel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAErYnsjARLfpXA+AHi14X4tppR-uTSo_MYK3_9miTH9MN07vog@mail.gmail.com \
    --to=tamas.lengyel@zentific.com \
    --cc=JBeulich@suse.com \
    --cc=mdontu@bitdefender.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).