<html>
<head>
<title>NT System Services</title>
<link rel="stylesheet" style="css/text" href="main.css" />
<script type="text/javascript" src="header.js"></script>
</head>

<body>
<h1>Daisuke Shimamoto
@ <a href="http://www.yl.is.s.u-tokyo.ac.jp/">Yonezawa Lab</a></h1>
<table style="width: 600px; height: 1.5em; background-color: lightblue;">
  <tbody>
  <tr>
  <td class="tabel"><a href="/~disk-ec7">Top</a></td>
  <td class="tabel"><a href="g_thesis.html">Graduation Thesis</a></td>
  <td class="tabel"><a href="studies.html">Master Thesis</a></td>
  <td class="tabel"><a href="links.html">Links</a></td>
  </tr>
  </tbody>
</table>

<h2>NT System Services</h2>
<div class="t1">
NT System Services are basically the same as
<a href="http://en.wikipedia.org/wiki/System_call">system calls</a>
on UNIX or UNIX compatible operating systems. It is the basic interface
of the internals of the OS. These functions include file access, process
management, memory management, network or hardware access, and so on.<br />
<br />
To use the above functions, user-mode programs must use the NT
System Services. For example, every open attempt to a file will
eventually call the NT System Service, 
<span style="font-style:italic">NtCreateFile</span>.
The original function used by the user-mode programs code could have
been a POSIX compatible <span style="font-style:italic">open</span> or
Win32 API <span style="font-style:italic">CreateFile</span>. Both
of them are merely a wrapper function for 
<span style="font-style:italic">NtCreateFile</span>.
<br />
<br />
Although NT System Services and system calls are similar, there are
a few differences. First of all, the number differs greatly. System calls
range up to approximately 300. In contrast, there are almost 1000
NT System Services (on WindowsXP). This implies that the NT System
Services offer more functionality than system calls. One striking
difference is that the NT System Service for Windows XP and later
offer GDI functions (prefixed with NtGdi) which are functions
for the graphical user interfaces. After all, Windows is a GUI
based OS. <br />
Secondly, and the largest one which daunted me is that there are no
official documents for NT System Services. The reason for this
may be because Microsoft does not want programmers to use the
NT System Services directly and just use the upper (wrapper)
functions. This way, Microsoft can change the functionality of
NT System Services around and still keep consistency for the
user-mode programs to work. In fact, the NT System Services
have changed at each update of Windows. For example, a new
NT System Serivce was added for Windows XP SP2 but Microsoft
has never annouced this. <br />
</div>

<div class="t1">
You can find a list of System Services
<a href="http://www.metasploit.com/users/opcode/syscalls.html">here</a>.
</div>

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-604248-1";
urchinTracker();
</script>
</body>
</html>
