03 Apr
Posted by: Christian Wimmer in: Common, JEDI Windows API Headers, JEDI Windows Security Code Lib
Do you need help? We can support you creating application using JWA and/or JWSCL.
Visit the Get Service site on SourceForge for more information like pricing.
Send post as PDF to convert this post to pdf.
17 Jun
Posted by: NeutralGeneral in: JEDI Windows Security Code Lib, JWSCL Downloads
Calculating Binary Hashes using TJwFileStreamEx
Why should I use TJwFileStreamEx instead of any other common stream class from the VCL?
Well this question is quite easily answered.
The first thing is that TJwFileStreamEx is based on Memory Mapped Files (MMF). MMF might be the fastest way to access files on your hard disk. Another good reason for using [...]
25 May
Posted by: Christian Wimmer in: Downloads, JEDI Windows Security Code Lib
JWSCL provides access to auto pointers or objects. It means that allocated space or objects are automtically destroyed/freed as soon as the auto object runs out of scope. What is a scope? A scope exists as long as the (I say) parent object exists. Parent objects can be:
The process. The auto pointer and thus the [...]
23 May
Posted by: Christian Wimmer in: JEDI Windows Security Code Lib
This simple example shows how you can change the target session of a new process.
uses
JwaWindows,
JwsclToken,
JwsclComUtils;
var
NewToken,
UserToken : TJwSecurityToken;
S : TStartupInfo;
P : TProcessInformation;
begin
UserToken := TJwSecurityToken.CreateWTSQueryUserTokenEx(nil, 1);
TJwAutoPointer.Wrap(UserToken); //automatic destroy
NewToken := TJwSecurityToken.CreateDuplicateExistingToken(UserToken.TokenHandle, MAXIMUM_ALLOWED);
TJwAutoPointer.Wrap(NewToken);
//needs TCB privilege -> Service
JwEnablePrivilege(SE_TCB_NAME, pst_Enable);
NewToken.TokenSessionId := 2;
//simple CreateProcessAsUser
[...]
You cannot impersonate a pipe until you have read from it. Even a write call doesn’t work. So a service has to wait for a dummy client write call until it can check the client’s token.
The following codes shows how multi instance pipe server could look like. Be aware that I wrote this to show [...]
Creating a binary file that consists of a service and a normal application can be done very simple without using the service manager. Just check for SYSTEM account. It is very unlikely that your app is run as SYSTEM (only RunAsSys does ).
uses …, JwsclToken;
begin
if JwIsSystem then
begin
try
Application.Initialize;
Application.CreateForm(TMyService, [...]
This is the preview Version of RunAsSys for Windows XP and Vista made with the help of JWSCL.
RunAsSys runs applications as SYSTEM user in the current user’s session. If you start it without any parameters it creates a command prompt with SYSTEM privileges by default. Otherwise you can add an application with [...]
02 May
Posted by: Christian Wimmer in: Common, JEDI Windows API Headers, JEDI Windows Security Code Lib
The following topics you can choose to research. Each topic has several possible options you can work on. The options are
Library: Creating Windows headers for JEDI Windows API or (wrapper) classes for JEDI Windows Security
Blogpost: Writing a blog post about the topic.
Example: Writing an example about the topic that demonstrates using the JEDI API, JWSCL [...]
28 Apr
Posted by: Christian Wimmer in: JEDI Windows Security Code Lib
Sometimes it is necessary to change the security settings of a file or folder for getting or denying write access. With JWSCL this task is made very easy. However there are some pitfalls to avoid.
The following code will also be available in the example section of the source code. The application gets a file or [...]
18 Apr
Posted by: Christian Wimmer in: JEDI Windows Security Code Lib
JWSCL uses (rarely) the DEBUG compiler condition definition like in “What is the internal variable TJwSecurityID.fDbgData for?“. However there is no “RELEASE” directive. Why? The reason is simple: There is no need for. If you don’t define DEBUG, JWSCL will be compiled without any debug codes. If you need a release condition, you can [...]