Showing posts with label technique. Show all posts
Showing posts with label technique. Show all posts
Thursday, April 9, 2009
Thursday, February 26, 2009
run .msi files as admin
If you are using Vista with UAC enabled, you may have noticed that some existing MSI packages may not install as expected.
Here's a fix.
The reason is because Windows Installer by default doesn't elevate to higher privileges until it is about to actually start doing work in the install sequence.
The attached .REG file adds a "Run as administrator" option to the context menu for .MSI files. This forces an elevation prompt before the .MSI is run so the entire install session is run with elevated privileges.
this dose not seem to work with .msi's living on network drives once moved to a local drive life is fine
Here's a fix.
The reason is because Windows Installer by default doesn't elevate to higher privileges until it is about to actually start doing work in the install sequence.
The attached .REG file adds a "Run as administrator" option to the context menu for .MSI files. This forces an elevation prompt before the .MSI is run so the entire install session is run with elevated privileges.
this dose not seem to work with .msi's living on network drives once moved to a local drive life is fine
Friday, February 20, 2009
home networking
However, to really secure this so that there isn't an inadvertant hole that someone else might sneak through when you're elswhere you need to make sure the local, approved address (all this traffic management will be IP address based) of the Toshi. is not likely to be replicated at the library.
There are 3 "private" address ranges available for use that never appear on the internet. They are:
a) 10.0.0.0 to 10.255.255.255 - this is a single class A range. Mask is 255.0.0.0
b) 172.16.0.0 to 172.31.255.255 - These are 16 class B ranges. Mask is 255.255.0.0
c) 192.168.0.0 through 192.168.255.255. These are 256 class C addresses and thus normally have a 255.255.255.0 mask
The library network will be on one of these 3 sets of addresses, as will your home LAN.
You will most commonly see either 192.168.0.0/24 (the /24 means 24 bit mask, or 255.255.255.0) or 192.168.1.0/24. The next most common is 10.0.0.0/8 (the /8 is, of course, an 8 bit mask or 255.0.0.0)
If you select a very uncommon range for your LAN at home then you can be reasonably confident of leaving your firewall open for that range. I would also consider using a non-standard mask for the local LAN IF your router/access point will allow and the built in DHCP server can cope.
Perhaps use a 172 range, like 172.29.0.0/28 - this would make available the address range 172.29.0.0 to 172.29.0.15 (14 usable addresses the lowest is always the network identifier and the highest is the broascast address so you always lose 2) - the decimal mask would be 255.255.255.240 - a most unusual mask to use with a class B address as well as being a largely unused private range allocation. Not perfectly secure, but the first step in security should always be obscurity. The reason for the non-standard mask is to further secure things. Even if you happen to connect to a LAN using the same base address range (the 172.329.0.0 part) your machine will still be inaccessible UNLESS they have also picked the same mask.
So, the easy way to alleviate this is to fix the addresses on the AD HOC network. Make the addresses from one of the ranges mentioned in my previous post (192.168.x.x, 172.17 to 21.x.x or 10.x.x.x - I suggest you use something from the 172 ranges to reduce the possibility of a conflict with any wired network you might connect to). Masks on both machines should match, addresses should be different but within the range defined by the mask. E.G. 172.18.1.1 and 172.18.1.2 with a mask of 255.255.255.248 (this will define a range of 172.18.1.0 to 172.18.1.7. Remember, the 0 and 7 are network and broadcast respectively so only 1 to 6 are available.
Then, you should be able to connect to the other machine by IP address rather than hoping the name will work (there's that slow browser service again). You can always update your local hosts files if you really want to use names. (C:\windows\system32\drivers\etc\hosts) Edit it with Notepad - the syntax has examples in the file. Make sure you end the last line with an - this is important!
Also, in this kind of situation it is probably best to go into the TCPIP properties, Advanced button, WINS tab and make sure that either the "Default" or "Enable Netbios over TCP/IP" radio button is selected - if in doubt, select the "Enable..." option.
Get this going with your firewall disabled, then enable it to setup the additional security. Using encryption on the wireless is also a good idea, but again, get it going first then add the encryption - then if it stops working, at least you'll know where to look
There are 3 "private" address ranges available for use that never appear on the internet. They are:
a) 10.0.0.0 to 10.255.255.255 - this is a single class A range. Mask is 255.0.0.0
b) 172.16.0.0 to 172.31.255.255 - These are 16 class B ranges. Mask is 255.255.0.0
c) 192.168.0.0 through 192.168.255.255. These are 256 class C addresses and thus normally have a 255.255.255.0 mask
The library network will be on one of these 3 sets of addresses, as will your home LAN.
You will most commonly see either 192.168.0.0/24 (the /24 means 24 bit mask, or 255.255.255.0) or 192.168.1.0/24. The next most common is 10.0.0.0/8 (the /8 is, of course, an 8 bit mask or 255.0.0.0)
If you select a very uncommon range for your LAN at home then you can be reasonably confident of leaving your firewall open for that range. I would also consider using a non-standard mask for the local LAN IF your router/access point will allow and the built in DHCP server can cope.
Perhaps use a 172 range, like 172.29.0.0/28 - this would make available the address range 172.29.0.0 to 172.29.0.15 (14 usable addresses the lowest is always the network identifier and the highest is the broascast address so you always lose 2) - the decimal mask would be 255.255.255.240 - a most unusual mask to use with a class B address as well as being a largely unused private range allocation. Not perfectly secure, but the first step in security should always be obscurity. The reason for the non-standard mask is to further secure things. Even if you happen to connect to a LAN using the same base address range (the 172.329.0.0 part) your machine will still be inaccessible UNLESS they have also picked the same mask.
So, the easy way to alleviate this is to fix the addresses on the AD HOC network. Make the addresses from one of the ranges mentioned in my previous post (192.168.x.x, 172.17 to 21.x.x or 10.x.x.x - I suggest you use something from the 172 ranges to reduce the possibility of a conflict with any wired network you might connect to). Masks on both machines should match, addresses should be different but within the range defined by the mask. E.G. 172.18.1.1 and 172.18.1.2 with a mask of 255.255.255.248 (this will define a range of 172.18.1.0 to 172.18.1.7. Remember, the 0 and 7 are network and broadcast respectively so only 1 to 6 are available.
Then, you should be able to connect to the other machine by IP address rather than hoping the name will work (there's that slow browser service again). You can always update your local hosts files if you really want to use names. (C:\windows\system32\drivers\etc\hosts) Edit it with Notepad - the syntax has examples in the file. Make sure you end the last line with an
Also, in this kind of situation it is probably best to go into the TCPIP properties, Advanced button, WINS tab and make sure that either the "Default" or "Enable Netbios over TCP/IP" radio button is selected - if in doubt, select the "Enable..." option.
Get this going with your firewall disabled, then enable it to setup the additional security. Using encryption on the wireless is also a good idea, but again, get it going first then add the encryption - then if it stops working, at least you'll know where to look
Saturday, February 14, 2009
Tokenmon 1.01
Tokenmon 1.01
Tokenmon is a tool which monitors and displays a variety of security-related activity taking place on a system. Tokenmon gets its name from the fact that Windows NT/2000 stores a process' security information, including the user account context in which the process executes, in an object called a token. Tokenmon monitors includes the following:
User logon/logoff
Applications enabling or disabling security privileges in their process tokens
Process startup and exit (token creation/deletion)
Impersonation
Tokenmon has advanced filtering and search capabilities that make it a powerful tool for exploring the way NT works, seeing how applications use security functions, or tracking down problems in system or application configurations.
Simply run the Tokenmon GUI (Tokenmon.exe). Note that you must have administrative privilege to run Tokenmon. Menus, hot-keys, or toolbar buttons can be used to clear the window, save the monitored data to a file, and to filter and search output.
Tokenmon is a tool which monitors and displays a variety of security-related activity taking place on a system. Tokenmon gets its name from the fact that Windows NT/2000 stores a process' security information, including the user account context in which the process executes, in an object called a token. Tokenmon monitors includes the following:
User logon/logoff
Applications enabling or disabling security privileges in their process tokens
Process startup and exit (token creation/deletion)
Impersonation
Tokenmon has advanced filtering and search capabilities that make it a powerful tool for exploring the way NT works, seeing how applications use security functions, or tracking down problems in system or application configurations.
Simply run the Tokenmon GUI (Tokenmon.exe). Note that you must have administrative privilege to run Tokenmon. Menus, hot-keys, or toolbar buttons can be used to clear the window, save the monitored data to a file, and to filter and search output.
Friday, February 13, 2009
Thursday, February 12, 2009
xml 2 pdf
Apache FOP (Formatting Objects Processor) is a print formatter driven by XSL formatting objects (XSL-FO) and an output independent formatter. It is a Java application that reads a formatting object (FO) tree and renders the resulting pages to a specified output. Output formats currently supported include PDF, PS, PCL, AFP, XML (area tree representation), Print, AWT and PNG, and to a lesser extent, RTF and TXT. The primary output target is PDF.
Tuesday, February 10, 2009
'A problem is preventing Windows from accurately checking the license for this computer - Error code: 0x80070002' on your Windows XP computer? 29-Sep-
Reset the Default Security Provider in Windows XP
- Start the computer. Press the F8 key during startup to start the computer in Safe mode.
- Start Registry Editor (Regedt32.exe).
- Delete the following registry keys in the Windows registry:HKEY_USERS\.DEFAULT\Software\Microsoft\Cryptography\Providers
HKEY_USERS\S-1-5-20\Software\Microsoft\Cryptography\Providers - Quit Registry Editor.
- Restart the computer.
Match the Default Security Provider to New Drive Letter
- Run Registry Editor (Regedit.exe).
- Navigate to the following registry key:HKEY_LOCAL_MACHINE\Software\Microsoft\Cryptography\Defaults\Provider
- You will see a few Provider key beneath the branch. In each Provider key, edit the Image Path value to match the new drive letter.
- Exit Registry Editor.
- Restart computer.
Reset the Drive Letter of the System Drive
Use Registry Editor to change the drive letter of the system drive back to its original value. Edit the following registry key to change the value of the system drive:
HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices
where \DosDevices\C: and other values presents the drive letters.
If your system drive letter has changed, undo the actions that caused it, or:
1. Use the Registry Editor to navigate toHKEY_LOCAL_MACHINE\Software\Microsoft\Cryptography\Defaults\Provider.
2. In each Provider key, edit the Image Path value to match the new drive letter.
3. When you are finished, exit the Registry Editor and shutdown / restart your computer.
If the default security provider has changed:
1. Restart your computer in Safe mode by pressing F8 during startup.
2. Use the Registry Editor to delete the following keys:
HKEY_USERS\.DEFAULT\Software\Microsoft\Cryptography\Providers
HKEY_USERS\S-1-5-20\Software\Microsoft\Cryptography\Providers
3. Exit the Registry Editor and shutdown / restart your computer.
When you start Windows XP and log on, your receive the subject error. When you press OK, you are returned to the Log On to Windows dialog.
NOTE: If you perform a System Restore, the problem may persist.
This behavior will occur if you are missing the %SystemRoot%\System32\secupd.dat file and / or the%SystemRoot%\System32\oembios.dat file and / or the %SystemRoot%\System32\oembios.bin file.
To resolve this problem:
1. Restart your computer and press F8 to start in Safe Mode.
2. Log on.
3. Right-click My Computer and press Manage.
4. Open the Event Viewer.
5. Check the System event log by using the View menu to Filter for an Event source of Windows File Protection since the last time you successfully logged on. You should be able to locate the files that could not be found during logon, probably as Event ID 64005.
6. Using another Windows XP computer, preferably as the same service pack and hotfix level, copy the missing files. If you don't have another Windows XP computer, you may be able to Expand the missing files from the Windows XP CD-ROM.
7. Restart your computer normally.
8. You may have to reapply the latest service pack and hotfixes, perform a SFC /SCANNOW and also check for viruses and other malware.
End of Article
===============================
A problem is preventing Windows from accurately checking the license for this computer.
Error Code: 0x80070002
When Windows XP boots up, after the Welcome Screen a message comes that shows the above message, and it does not allow you to login.
Solution!
Boot into Safemode
Then do the following in the command promt.
Reboot and check if the problem persists.
If not check if the following files are present in the System32 Folder
%SystemRoot%\System32\secupd.dat
%SystemRoot%\System32\oembios.dat
%SystemRoot%\System32\oembios.bin
If any of these files are missing, restore these files, from the setup disk, I386 folder or from another system.
To restore from a setup disk, put the CD in, and browse to the I386 folder copy the file with extension XXXXX.XX_ where XXXX.XX is the file name with first 2 letters of the extension. Rename it to a .cab file and extract the file to system32.
Reboot the system and now try again.
Your problem must be solved.
If still your problem persists try the following from Microsoft knowledge base.
Reset the default security provider in Windows XP
To reset the default security provider in Windows XP, delete the relevant registry keys in the Windows registry. To do this, follow these steps:
1. Start the computer. Press the F8 key during startup to start the computer in Safe mode.
2. Start Registry Editor (Regedt32.exe).
3. Delete the following registry keys in the Windows registry:
HKEY_USERS\.DEFAULT\Software\Microsoft\Cryptography\Providers
HKEY_USERS\S-1-5-20\Software\Microsoft\Cryptography\Providers
4. Quit Registry Editor.
5. Restart the computer.
Reset the drive letter of the system drive
Use Registry Editor to change the drive letter of the system drive back to its original value. Edit the following registry key to change the value of the system drive:
HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices
Windows Update Errors: 0x80070002
Error Code: 0x80070002
When Windows XP boots up, after the Welcome Screen a message comes that shows the above message, and it does not allow you to login.
Solution!
Boot into Safemode
Press F8 While booting just after the BIOS screen or during the OS Selection menu.
Then do the following in the command promt.
cd %system root% \ system32 regsvr32 licwmi.dll regsvr32 regwizc.dll regsvr32 licdll.dll regsvr32 jscript.dll regsvr32 vbscript.dll regsvr32 msxml.dll regsvr32 shdocvw.dll regsvr32 softpub.dll regsvr32 wintrust.dll regsvr32 initpki.dll regsvr32 dssenh.dll regsvr32 rsaenh.dll regsvr32 gpkcsp.dll regsvr32 sccbase.dll regsvr32 slbcsp.dll regsvr32 cryptdlg.dll
Reboot and check if the problem persists.
If not check if the following files are present in the System32 Folder
%SystemRoot%\System32\secupd.dat
%SystemRoot%\System32\oembios.dat
%SystemRoot%\System32\oembios.bin
If any of these files are missing, restore these files, from the setup disk, I386 folder or from another system.
To restore from a setup disk, put the CD in, and browse to the I386 folder copy the file with extension XXXXX.XX_ where XXXX.XX is the file name with first 2 letters of the extension. Rename it to a .cab file and extract the file to system32.
Reboot the system and now try again.
Your problem must be solved.
If still your problem persists try the following from Microsoft knowledge base.
Reset the default security provider in Windows XP
To reset the default security provider in Windows XP, delete the relevant registry keys in the Windows registry. To do this, follow these steps:
1. Start the computer. Press the F8 key during startup to start the computer in Safe mode.
2. Start Registry Editor (Regedt32.exe).
3. Delete the following registry keys in the Windows registry:
HKEY_USERS\.DEFAULT\Software\Microsoft\Cryptography\Providers
HKEY_USERS\S-1-5-20\Software\Microsoft\Cryptography\Providers
4. Quit Registry Editor.
5. Restart the computer.
Reset the drive letter of the system drive
Use Registry Editor to change the drive letter of the system drive back to its original value. Edit the following registry key to change the value of the system drive:
HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices
Windows Update Errors: 0x80070002
Friday, February 6, 2009
HTA Developers Center
Tuesday, January 6, 2009
What happens if two AD objects have the same RDN?
Every Active Directory (AD) object has a distinguished name (DN—e.g., CN=John Savill,CN=Users,DC=SavillTech,DC=Com) that uniquely identifies the object and its position in AD. The system also creates a relative distinguished name (RDN), which is a name relative to the container (e.g., CN=John Savill for the user).
Two objects with the same RDN can't exist in one container. For example, in the container CN=Users,DC=SavillTech, CN=John Savill and OU=John Savill are allowed because one is a user and the other is an organisational unit (OU). However, CN=John Savill and CN=John Savill aren't allowed.
The only way you can have a duplicate RDN is if two objects are created on different domain controllers (DCs). But at the next replication cycle, the system will rename the older object.
To find objects that the system has renamed because of RDN collisions, use the search.vbs script in \support\tools\support.cab as follows:
Two objects with the same RDN can't exist in one container. For example, in the container CN=Users,DC=SavillTech, CN=John Savill and OU=John Savill are allowed because one is a user and the other is an organisational unit (OU). However, CN=John Savill and CN=John Savill aren't allowed.
The only way you can have a duplicate RDN is if two objects are created on different domain controllers (DCs). But at the next replication cycle, the system will rename the older object.
To find objects that the system has renamed because of RDN collisions, use the search.vbs script in \support\tools\support.cab as follows:
cscript search.vbs "LDAP://Any matches will display the RDN for the renamed objects./dc= ,dc=com" /C:"(CN=*\0ACNF:*)" /P:distinguishedName /S:SubTree
Thursday, December 4, 2008
shares group has access
SomarSoft's DumpSec is a security auditing program for Microsoft Windows® NT/XP/200x. It dumps the permissions (DACLs) and audit settings (SACLs) for the file system, registry, printers and shares in a concise, readable format, so that holes in system security are readily apparent. DumpSec also dumps user, group and replication information.
get server name
enumerate shares
fore each share
Dump all NTFS file permissions, printer permissions, share permissions to a db.
Sunday, November 30, 2008
excel tips
Handling Excel Errors
VBA: UDF to perform a 3-parameter Vlookup
automate excel
#This cmdlet picks the servers from workstations.txt one by one, and collects IP details of each server and pushes them #into excel sheet
VBA: UDF to perform a 3-parameter Vlookup
automate excel
Use Windows PowerShell to Automate Microsoft Excel |
#This cmdlet picks the servers from workstations.txt one by one, and collects IP details of each server and pushes them #into excel sheet
Wednesday, November 12, 2008
project - exchaneg automation
- create a 15 element samacctIndex array and populate with 0
- remove spaces from last name - use regx
- combine 1st letter of frist name with revised last name -samacctMain
- search 4 all samacctMain
- 4 each samacctMain use regex 2 strip samacctIndex
- put samacctIndex in samacctIndex(samacctIndex) element replacing 0
- search 4 first 0 in samacctIndexarray the element # will become the samacctIndex
- combine samacctMain+samacctIndex = samacctName
- destroy & recreate a 15 element samacctIndex array and populate with 0
- get all users with admin loc codes
- ou they're in
- groups they're in
- other qualifiers i.e department responsibility
- look 4 coreolation
HOW TO: Reconnect a mailbox to another user
VBScript to create a large number of mailbox-enabled user accounts
sorting excel data via VBA
sort method doc
Using VBA to Sort Data on Multiple Sheets
Sorting Cells using VBA
subroutine which will sort the active worksheet by first column, then remove any duplicates
re-sorts a named range when data is added
replace a user acct ctrl-F
Sorting a Range using VBA - Excel Help Forum
The Recipient Update Service and Linked Value Replication
Select a Product Advanced SearchHow to work with the Exchange Recipient Update Service
How to Manually Update the Recipient Update Service via script
Creating Exchange Users with Excel (Part 1)
exchange Management & Administration Articles
The SelfADSI Tutorial introduces administrators to the scripting in Active Directory environments and other LDAP directory systems. The aim is to understand and being able to develop directory scripts without having specific previous knowledge in ADS or LDAP. Preferred scripting language is Visual Basic Script (VBScript). ADS scripting / LDAP scripting is easy - learn it with SelfADSI.The minimum attributes needed for RUS are mailNickname (Exchange Alias) and msExchHomeServerName
In this section of the SelfADSI Scripting tutorial the Exchange 2000/Exchange 2003 attributes of an Active Directory Services object will be described. These AD attributes and the additional tabs in the admin utility are only visible if Exchange has been installed in the Active Directory forest and if the according management tools exist on your machine - and if the regarding object is mail enabled.
http://www.microsoft.com/technet/scriptcenter/scripts/message/default.mspx?mfr=true
Alphabetical list of AD attributes
SelfADSI tutorial according "Creating mail enabled users".
A User Comes and a User Goes
http://www.petri.co.il/creating_exchange_users_with_excel.htm
http://msdn.microsoft.com/en-us/library/aa221612(office.11).aspx
http://msdn.microsoft.com/en-us/library/aa221357(office.11).aspx
http://www.ozgrid.com/
http://digiassn.blogspot.com/2006/01/multiple-row-selection-in-excel-vba.html
getting married
http://forums.msexchange.org/m_1800465423/tm.htm
http://forums.msexchange.org/m_180041600/tm.htm
http://forums.msexchange.org/m_1800412283/tm.htm
http://forums.msexchange.org/m_10075700/tm.htm
Tuesday, November 11, 2008
Friday, October 31, 2008
Monday, October 13, 2008
Monday, September 15, 2008
Saturday, July 5, 2008
boot_CD ackup, partition, recovery
BartPE or ReatogoXPE can build a bootable XP CD based on the files on a particular OS install.
UBCD4Win is a bootable recovery CD
burn it to a DVD in order to do a fresh installation. To handle this task, grab a copy of the most popular CD and DVD burning tool ImgBurn, bur
Modify Your Partitions With GParted Without Losing Data using GParted live cd
Wednesday, June 18, 2008
Subscribe to:
Posts (Atom)