5 RELATED WORK
Malware and attack payload analysis options are
available at multiple levels. The use of instruction
set emulation is suitable for shellcode emulation due
to their typical self-contained nature (Polychronakis
et al., 2006). However, this same assumption presents
this approach with its weakest point (Shimamura and
Kono, 2009). Standalone malware requires the use
of full system emulators to examine given that this
type of malware typically manipulates kernel-level
data structures in order to attain stealth and persis-
tence (e.g. rootkits) (Yin et al., 2010). An interesting
alternative to full system emulation was proposed in
terms of extending hypervisors that make use of hard-
ware virtualization extensions. Its benefit lies in the
speed-up over the notoriously slow full system emu-
lation method (Snow et al., 2011). The advent of web-
based and mobile applications brought with it a breed
of malware that executes at the level of web brow-
ers, file format parsers, interpreters and process vir-
tual machines. This type of malware is best analyzed
by instrumenting/emulating their corresponding run-
time environments (Cova et al., 2010; Schreck et al.,
2013; Weichselbaum et al., 2014).
Web IDS efforts mainly focus on detecting SQLi
and XSS attacks due to the frequent occurrences of
the software flaws they exploit as well as the ease with
which they can be created. Dynamic taint tracking is a
program information flow technique that has attracted
the most attention in this regard (Xu et al., 2006; Vogt
et al., 2007; Sekar, 2009; Tripp et al., 2009). In the-
ory this technique could also be suitable to detect web
code injections at the shell and script levels due to
the similar exploitation techniques shared with SQLi
and XSS attacks. Yet, these host-level methods in-
evitably impose runtime overheads. Furthermore, re-
cent findings exposed a number of severe limitations
(Afooshteh, 2014).
6 CONCLUSIONS AND FUTURE
WORK
This work set out tackling the problem of providing a
complementary dynamic analysis mechanism to static
analysis-based web IDS for the effective detection of
code injection attacks. The mainstream approach of
using processor emulators could not be used given
that the payloads in question may contain scripts or
shell commands other than machine instructions. Be-
sides, such emulators are not suitable for on-line set-
tings. The proposed solution was implemented in
WeXpose, that uses JIT binary modification in order
to avoid the limitations associated with processor em-
ulation. The use of heuristics that identify the possi-
ble start positions of payloads further bring down the
computational cost of dynamic analysis that results
in delaying of alerts. Case studies show that WeX-
pose can detect obfuscated attacks, however real-time
alerting can only be attained at considerable addi-
tional costs in terms of the required computational
power.
Future work has to focus primarily on this prob-
lem, potentially by using smarter heuristics. As for at-
tack obfuscation resistance WeXpose can be extended
to also cover code reuse attacks, such as ROP and
RFI attacks. The JIT binary modification approach
provides the ideal basis for further extension in this
direction given that it can provide WeXpose with ac-
cess to the replicated program image of the target web
server. With these enhancements in place WeXpose
will be subjected to a quantitative study.
REFERENCES
Abbasi, A., Wetzels, J., Bokslag, W., Zambon, E., and
Etalle, S. (2014). On emulation-based network intru-
sion detection systems. In Research in Attacks, Intru-
sions and Defenses, pages 384–404. Springer.
Afooshteh, A. N. (2014). Taintless. In Blackhat Arsenal.
Blackhat.
Bruening, D., Zhao, Q., and Amarasinghe, S. (2012). Trans-
parent dynamic instrumentation. In ACM SIGPLAN
Notices, volume 47, pages 133–144. ACM.
Cova, M., Kruegel, C., and Vigna, G. (2010). Detection and
analysis of drive-by-download attacks and malicious
javascript code. In Proceedings of the 19th interna-
tional conference on World wide web, pages 281–290.
ACM.
Egele, M., Scholte, T., Kirda, E., and Kruegel, C. (2012). A
survey on automated dynamic malware-analysis tech-
niques and tools. volume 44, page 6. ACM.
Erickson, J. (2008). Hacking: The art of exploitation. No
Starch Press.
Kruegel, C. (2014). Full system emulation: Achieving suc-
cessful automated dynamic analysis of evasive mal-
ware. In Proc. BlackHat USA Security Conference.
Maggi, F., Matteucci, M., and Zanero, S. (2010). Detecting
intrusions through system call sequence and argument
analysis. volume 7, pages 381–395. IEEE.
Polychronakis, M., Anagnostakis, K. G., and Markatos,
E. P. (2006). Network–level polymorphic shellcode
detection using emulation. In Detection of Intrusions
and Malware & Vulnerability Assessment, pages 54–
73. Springer.
Portokalidis, G. and Keromytis, A. D. (2010). Fast and
practical instruction-set randomization for commod-
ity systems. In Proceedings of the 26th Annual Com-
SECRYPT2015-InternationalConferenceonSecurityandCryptography
14