Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 09-04-2004, 04:51
omega_red
 
Posts: n/a
Direct port I/O under NT without a driver

I've played today with ZwSetInformationProcess and found Process UserModeIOPL information class that can be used to grant direct IO permission to a process. However, it needs that the current account has SeTcbPrivilege granted - "Work as a part of operating system". Code enables this privilege for current account, but changes are visible after next logon. One question follows - if there are no changes till relogin, why GetTokenInformation returs that this privilege is enabled? But call to ZwSetInformationProcess returns STATUS_PRIVILEGE_NOT_HELD.

ry.pl/~omega/progs/DirectIO.rar
Reply With Quote
  #2  
Old 07-23-2005, 19:36
lay0n2004
 
Posts: n/a
I granted SeTcbPrivilege and set it but not work for my winxp+sp1
Are there some thing I missed?
Reply With Quote
  #3  
Old 07-24-2005, 00:34
Opc0de
 
Posts: n/a
Don't work in my XP SP1

Exception information
Code: 0xc0000096
Address: 0x040140e
Reply With Quote
  #4  
Old 07-24-2005, 18:03
nskSem
 
Posts: n/a
Add your user to "As a part of OS" programmly or handly in "local policy". Than set SE_TCB_PRIVILEDGE in your programm, that's all. Work in XP.
Reply With Quote
  #5  
Old 07-25-2005, 10:59
lay0n2004
 
Posts: n/a
Quote:
Originally Posted by nskSem
Add your user to "As a part of OS" programmly or handly in "local policy". Than set SE_TCB_PRIVILEDGE in your programm, that's all. Work in XP.
a tittle odd even your demo code on fasm board I got
EFlags : 00010246 ExceptionCode:C0000096 if dbg attach it eflags will be xxxx3xxx If I run it with dbg, 0xC0000096 exception occured with eflags xxxx0xxx, press f9 key then become xxxx3xxx
Reply With Quote
  #6  
Old 07-25-2005, 16:12
omega_red
 
Posts: n/a
Exception is generated when first running this, without relogging, as explained above (not sure why though). After logout/login all is OK here (xp sp2).
Reply With Quote
  #7  
Old 07-26-2005, 12:25
lay0n2004
 
Posts: n/a
Quote:
Originally Posted by omega_red
Exception is generated when first running this, without relogging, as explained above (not sure why though). After logout/login all is OK here (xp sp2).
thank for your helping. well, i re-loggined! is hardware related? my pc is intel 2.8cg disabling ht. the interesting thing is if i run or attach it with any debugger the iopl will become 3. if run without debugger, context iopl got 0

any idea to help ? thanks for advance

the port i tried : 295h 296h

with Token privileges: 20
SeTcbPrivilege
SeAssignPrimaryTokenPrivilege
SeChangeNotifyPrivilege
SeSecurityPrivilege
SeBackupPrivilege
SeRestorePrivilege
SeSystemtimePrivilege
SeShutdownPrivilege
SeRemoteShutdownPrivilege
SeTakeOwnershipPrivilege
SeDebugPrivilege
SeSystemEnvironmentPrivilege
SeSystemProfilePrivilege
SeProfileSingleProcessPrivilege
SeIncreaseBasePriorityPrivilege
SeLoadDriverPrivilege
SeCreatePagefilePrivilege
SeIncreaseQuotaPrivilege
SeUndockPrivilege
SeManageVolumePrivilege

ZwSetInformationProcess result: 0h (seem ok)

Trying direct IO...EFlags : 00010246 ExceptionCode:C0000096 (context iopl == 0 ?)

Last edited by lay0n2004; 07-26-2005 at 12:41.
Reply With Quote
  #8  
Old 07-27-2005, 02:42
Opc0de
 
Posts: n/a
This exception is really weird.
I'm trying to figure out what is happening...
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT +8. The time now is 14:36.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( 1998 - 2024 )