Tuesday, November 12, 2013

Enable remote desktop from command line remotely


To enable remote desktop.
§  Open registry editor by running regedit from Run.
§  Go to the node HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server
§  Change the data of the value fDenyTSConnections to 0.

PsTools:-
psloggedon.exe –l
psloggedon.exe \\ <ip> or <comp name>
psloggedon.exe <username>
Eg:-
psexec.exe \\ipaddress cmd

Download Link:


First run this PsTool  your local pc to access the command prompt of user remotely :

psexec.exe \\ipaddress cmd

or

psexec.exe \\computername  cmd

Now you will get cmd of the remote user

Then We can enable remote desktop from windows command line by running the following command.

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f

To disable remote desktop we need to run the below command.

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 1 /f

Reboot or logoff is not required after running the above command. I have tested this on Windows XP and Windows 7 and it has worked fine. It would work fine on Windows Vista too.

To enable Remote assistance:

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fAllowToGetHelp /t REG_DWORD /d 1 /f

You can run the below command for each user you want to allow to connect remotely.

net localgroup “Remote Desktop Users” Domain\Loginid /add

If you have a group of domain users and want to allow the whole group to do remote desktop on the computer, you can do that as well with a single command. Just replace the loginid in the above command with the group name.

net localgroup “remote desktop users” “group name”  /add
net localgroup “remote desktop users” “domain users”  /add


Enabling/Disabling Windows Firewall from cmd remotely:

First run this PsTool  your local pc to access the command prompt of user remotely :

psexec.exe \\ipaddress cmd

or

psexec.exe \\computername  cmd

Now you will get cmd of the remote user


For win7 :

Netsh advfirewall set allprofiles state off
Netsh advfirewall set allprofiles state on
netsh advfirewall firewall set rule group="remote desktop" new enable=Yes
netsh advfirewall firewall set rule group="remote desktop" new enable=No


For xp :

netsh firewall show opmode
netsh firewall set opmode disable
netsh firewall set opmode enable

Thursday, October 3, 2013

Multifox - connect to websites using different user names simultaneously

Multifox is an extension that allows Firefox to connect to websites using different user names. Simultaneously!

For example, if you have multiple Gmail accounts, you can open them all at the same time. Each Firefox window, managed by Multifox, accesses an account without interfering each other.




[ Click on the Images to enlarge. ]

This is a Mozilla Firefox extension which only works on Firefox.

Friday, July 5, 2013

HowTo update Malwarebytes offline?


ISSUE: I need to get the latest database onto a computer that cannot access the Internet.
SOLUTION: You can manually copy the database from a working computer using a flash drive or CD onto the infected PC. Our database file is stored in the following locations.




  • Windows XP and 2000
  • C:\Documents and Settings\All Users\Application Data\Malwarebytes\Malwarebytes' Anti-Malware\rules.ref
  • Windows Vista and Windows 7:
  • C:\ProgramData\Malwarebytes\Malwarebytes' Anti-Malware\rules.ref

    Note: Starting with Malwarebytes Anti-Malware 1.60, you must also copy the file database.conf located within the Configuration folder which is in the same folder as rules.ref listed above.

Friday, June 28, 2013

Bookmark all open browser tabs at once

Chrome

Right-click on a tab and select "Bookmark all tabs" or hit Ctrl+Shift+D.


Firefox

Just like in Chrome, right-click on a tab and select "Bookmark All Tabs" or hit Ctrl+Shift+D.


Internet Explorer

Click on the "View favorites" icon, then the "Add favorites" drop-down menu. Select "Add current tabs to favorites." You can save a few steps by hitting Alt+Z, then clicking on "Add current tabs to favorites."


This is how to bookmark all your open tabs with just a couple of mouse clicks or with keyboard shortcuts.

Thursday, June 13, 2013

Windows XP / Server 2003 Boot Error NTOSKRNL.EXE Is Missing Or Corrupt

Every once in while when you reboot a workstation or server you'll get the famous NTOSKRNL.EXE is Missing or Corrupt error  Windows NT could not start because the following file is missing or corrupt: 

         C:\Windows\System32\Ntoskrnl.exe

It's fairly straight forward to resolve this problem. Start by booting your machine from the install media (CD/DVD or USB Drive) when prompted follow these steps :



- Boot to the recovery console (http://support.microsoft.com/kb/326215)

- Select your Windows installation that you want to recover

- When prompted provide the local administrator password

- Once you are into the recovery console you will probably be sitting at a C:\WINDOWS prompt

- Change the directory to the i386 folder on your CD / DVD drive (If you only have one partition it will most likely be D:\)

- Copy the following files to the C:\ drive

        copy ntldr C:
        
        copy ntdetect.com C:

- Change your source directory back to C:\Windows

- Next you will need to fix your boot record

       fixboot C:

- Most likely you will also have to fix the boot .ini using the bootcfg command

       bootcfg /rebuild

- Add the required Windows installation to your boot list

- Add the Load Identifier (Custom description)

- Add the OS Load Options (/fastdetect)

- Type exit to reboot the machine


Your machine should now be recovered from the NTOSKRNL.exe is Missing or Corrupt" error.

Monday, June 10, 2013

OS BOOT FILES

DOS Boot up Sequence


IO.SYS – A binary file that provides basic input/output interface between the ROM BIOS and the Hardware
MSDOS.SYS – A binary file considered to be the core of the DOS operating system
CONFIG.SYS – A text file used to load drivers and memory managers and also use to configure the system to the user’s needs
COMMAND.COM – DOS user interface loads the command prompt which interprets DOS commands
AUTOEXEC.BAT – A text file that contains setting up display settings, environment variables and routines

Win 9X Boot up Sequence


IO.SYS - I/O files use to communicate with the BIOS
MSDOS.SYS - Loads OS into memory (Also use to configure boot files in windows 9x)
SYSTEM.DAT and USER.DAT - system and user settings (REGEDIT)
CONFIG.SYS - loads device drivers for backwards compatibility
AUTOEXEC.BAT - sets system environment use for backwards compatibility
WIN.COM - Initiates the Windows 9x protected load phase
SYSTEM.INI - use to configure 16-bit windows drivers and critical files
WIN.INI- sets 16-bit windows environment
VxD - loads windows virtual device drivers

Windows 2000/XP Key Boot Files



NTLDR
– Found in the MBR this file boots up the Windows 2K/XP operating system
BOOT.INI - is text file that lists the available OS found and tells the NTLDR where to find boot partition
BOOTSECT.DOS – Locates the IO.SYS file so you can start another OS in a dual boot environment
NTDETECT.COM – Loads into protected mode and detects the installed hardware on your system
NTBOOTDD.SYS - On a system with a SCSI boot device, this file is used to recognize and load the SCSI boot partition.
NTOSKRNL.EXE - Windows 2000 Core Files
WIN.COM - Windows 2K/XP command file
HAL.DLL - Hardware Abstraction layer of Windows 2K/XP

Windows Vista/7 Key Boot Files



BOOTMGR 
– Found in the MBR this file boots up the Windows operating system
BCD (Boot Configuration Data) - is text file that lists the available OS found and tells the BOOTMGR where to find boot partition
WINLOAD.EXE - Loads the Windows Interface
NTOSKRNL.EXE - Windows Vista/7 Core Files
WIN.COM - Windows Vista/7 command file
HAL.DLL - Hardware Abstraction layer of Windows Vista/7

Thursday, May 30, 2013

Low-Level vs High-Level Formatting

Many people do not distinguish low-level formatting (also called physical formatting) from high-level formatting (also called logical formatting).
Even though hard drives can be very small, they still contain millions of bits and therefore need to be organized so that information can be located. This is the purpose of the file system. The surface of each cylinder, which is originally uniform, is divided during formatting (by divided we mean of course that the surface particles are magnetised...) into little parcels that can be more easily located.



Low-level formatting

The purpose of low-level formatting is to divide the disk surface into basic elements:
  • tracks
  • sectors
  • cylinders
Remember that a hard drive consists of several circular platters rotating around an axis and covered on either side by a magnetic oxide which, since it is polarised, can be used to store data.

The tracks are the concentric areas written on both sides of a platter.

Finally, these tracks are divided into pieces called sectors.


There are millions of tracks and each has around 60 to 120 sectors.
cylinder refers to all the data located on the same track of different platters (i.e. vertically on top of each other) as this forms a "cylinder" of data in space.

Physical formatting therefore consists in organizing the surface of each platter into entities called trackers and sectors, by polarising the disk areas using the write heads. Tracks are numbered starting from 0, then the heads polarise concentrically the surface of the platters. When the head goes from one track to the next, it leaves a gap. Each track is itself organized into sectors (numbered starting from 1) and separated by gaps. Each of these sectors starts with an area reserved for system information called a prefix and ends with an area called a suffix
The purpose of low-level formatting is therefore to prepare the disk surface to receive data (and therefore does not depend on the operating system) and to mark "defective sectors" using tests performed by the manufacturer.
When you buy a hard drive, it has already undergone low-level formatting. 
SO YOU DO NOT NEED TO PERFORM LOW-LEVEL FORMATTING!


High-level formatting

Logical formatting occurs after the low-level formatting. It creates a file system on the disks that will allow an operating system (DOS, Windows 95, Linux, OS/2, Windows NT, ...) to use the disk space to store and access files.
Operating systems use different file systems, so the type of logical formatting will depend on the operating system you install. So, if you format your disk with a single file system, this naturally limits the number and type of operating systems that you can install (in fact, you can only install operating systems that use the same file system).
Fortunately, there is a solution to this problem which is to create partitions. Each of the partitions can effectively have its own file system, and you can therefore install different types of operating systems.

Types of Hard Drive Partitions and Drive Partitioning Operations

Disk partition
A partition is a part or section of a hard disk, or, in other words, a storage space unit of the highest level on it. You can have only one partition, occupying 100% of your HD, or divide your hard disk into multiple partitions (each for a certain purpose), determine their size, install the operating and file system you want. As a result, your single physical hard drive will turn into several smaller logical disks.
Actually a hard disk can exist on your machine without any partitions on it, but it’ll be pointless because you won’t be able to implement even basic tasks, say, install an operating system and thus store and access your data properly. It need be added that you can install the majority of Windows OSes onto a non-partitioned disk - in this case the operating system will implement partitioning itself in the course of installation.


Types of hard drive partitions

Primary Partition is a partition that is needed to store and boot an operating system, though applications and user data can reside there as well, and what’s more, you can have a primary partition without any operating system on it. There can be up to a maximum of four primary partitions on a single hard disk, with only one of them set as active (see “Active partition”).
Active (boot) partition is a primary partition that has an operating system installed on it. It is used for booting your machine. If you have a single primary partition, it is regarded as active. If you have more than one primary partition, only one of them is marked active (in a given PC session).
Extended partition can be sub-divided into logical drives and is viewed as a container for logical drives, where data proper is located. An extended partition is not formatted or assigned a drive letter. The extended partition is used only for creating a desired number of logical partitions.
Logical drive is created within an extended partition. A logical partition is a way to extend the initial limitation of four partitions. An extended partition can contain up to 24 logical partitions (you’re limited by the number of drive letters and the amount of hard drive space available for creating drives; of course, it’s senseless to use 24 partitions on a system in most cases, because it will be a data organization nightmare). Logical partitions are used for storing data mainly, they can be formatted and assigned drive letters; their details are listed in the extended partition’s table - EMBR (Extended Master Boot Record).


Drive partitioning operations

There are 2 types of partition operations: basic and advanced. The former are more frequent, but you are likely to need to perform the latter ones either. So, let’s analyze both types.
Basic partition operations:
  • Create partition
  • Increase/decrease partition size
  • Increase free space
If a partition’s capacity is not sufficient for storing extra data on it, you might need to increase its space. The increase free space wizard will help you fulfill this task.
  • Move partition
In what cases do you move partitions? First, if you want to change the letter order assigned by the OS. Then in case you need to work with some older OS that can boot from binary partitions located at the beginning of the disk, you also perform this kind of operation. Speeding up partition operations and changing partition configuration are also implemented by means of moving partitions.
  • Copy partition
You perform this operation when you create a partition backup or want to move all data from an old disk to a new one.
  • Delete partition
After a partition is deleted, its space is added to unallocated disk space. It can be used for a new partition or to resize an existing partition.
  • Delete partition and destroy data (Wipe process)
To securely wipe out data stored on the deleted partition use special partitioning tools, which include powerful hard disk/partition wiping utilities.
  • Split partition
You can split a partition in two or create an empty partition from another partition’s free space.
  • Merge partitions
You can merge two partitions, even if their file systems are different. All data will stay intact and reside on the resulting partition.
  • Explore partition
You can explore and manage partition contents before configuring operations on that partition.
  • Changing partition labels
The partition label is a name assigned to a partition for easier recognition, for example, “System”, “Data”, etc.
  • Format partition
To organize a file system that supports files and folders data storage, you must format a partition.
  • Checking hard disk partitions for errors
  • Defragmenting a partition
Defragmentation is reorganizing file storage on a hard disk partition so that parts of files are not spread about the disk, which allows the red head to move less across the disk and thus, increases PC and server performance.
Advanced partition operations:
  • Changing partition letter
Some operating systems assign letters to hard disk partitions at startup. Connecting an additional disk as well as creating or deleting a partition on existing disks might change your system configuration. As a result, some applications might stop working or user files might not be opened. To avoid this, you can change letters assigned by the operating system.
  • Converting a file system
Some file systems do not support large-sized partitions, files, or disks. They may also have a limited root size. To improve these characteristics you can use this particular feature.
Supported conversions:
FAT 16→ FAT 32
FAT 16→NTFS
FAT 32→FAT 16
FAT 32→NTFS
NTFS→FAT 16
NTFS→FAT 32
Ext2→Ext3
Ext3→Ext2
  • Hiding a partition
This option is necessary for protecting important information from unauthorized or casual access. Partition software usually allows you to hide both primary and logical partitions.
  • Unhiding a partition
This feature lets the operating system see the partition, assign a letter and provide access to its files.
  • Setting active partition
Since a hard disk can have only one active partition, the latter must be set.
  • Resizing a root
The FAT 16 partition is located in a special place and has a limited size. Advanced partitioning tools enable you to change the size of existing partitions.
  • Changing cluster size
A file occupies at least one cluster (one unit of disk space allocation for files and directories). Smaller clusters reduce slack disk space.
  • Changing partition type
This operation is performed to change a hexadecimal value that defines the file and operating system suitable for a partition.

Tuesday, May 28, 2013

MaraDNS - Implements DNS on Windows and UNIX

A small open-source DNS server



MaraDNS is a package that implements the Domain Name Service (DNS), an essential internet service. MaraDNS is open source software; this means that anyone is free to download, use, and modify the program free of charge.
People like MaraDNS because it's small, lightweight, easy to set up, and remarkably secure. It's also cross platform -- the program runs both in Windows and in UNIX clones.

More information describing MaraDNS is on the overview and summary page.


Download MaraDNS :

The current stable release of MaraDNS is MaraDNS 2.0.07, released January 20, 2013. This release is available as UNIX/Windows source code (in two different compression formats) as well as a Windows binary (the win32.zip file).

Download Link :

http://www.maradns.org/download.html


MaraDNS tutorial :


With this tool you can  implement DNS on your own home PC running Windows or Linux.

What Is a Port Number (Logical Port)?

In computer networking, the term port can refer to either physical or virtual connection points.
When considering computer networks, there are two kinds of port that we deal with - Physical Ports and Logical Ports. 



Physical network ports allow connecting cables to computers, routers, modems and other peripheral devices. Several different types of physical ports available on computer network hardware.
A physical port, as opposed to a virtual or logical port is an interface on a computer into which you can insert a connector for a device.
Examples of Physical Port : RJ45 port (Ethernet/LAN/NIC Port), Serial Port (RS-232), USB Port.

Virtual ports are part of TCP/IP networking. These ports allow software applications to share hardware resources without interfering with each other. Computers and routers automatically manage network traffic traveling via their virtual ports. Network firewalls additionally provide some control over the flow of traffic on each virtual port for security purposes.



Logical Port :

In computer networking, a port is an application-specific or process-specific software construct serving as a communications endpoint in a computer's host operating system. A port is associated with an IP address of the host, as well as the type of protocol used for communication. The purpose of ports is to uniquely identify different applications or processes running on a single computer and thereby enable them to share a single physical connection to a packet-switched network like the Internet.

The protocols that primarily use ports are the Transport Layer protocols, such as the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP) of the Internet Protocol Suite. A port is identified for each address and protocol by a 16-bit number, commonly known as the port number. The port number, added to a computer's IP address, completes the destination address for a communications session. That is, data packets are routed across the network to a specific destination IP address, and then, upon reaching the destination computer, are further routed to the specific process bound to the destination port number.
Note that it is the combination of IP address and port number together that must be globally unique. Thus, different IP addresses or protocols may use the same port number for communication; e.g., on a given host or interface UDP and TCP may use the same port number, or on a host with two interfaces, both addresses may be associated with a port having the same number.

In computer networking, a port number is part of the addressing information used to identify the senders and receivers of messages. Port numbers are most commonly used with TCP/IP connections. Home network routers and computer software work with ports and sometimes allow you to configure port number settings. These port numbers allow different applications on the same computer to share network resources simultaneously.




[ Click On Image to Enlarge ]

How Port Numbers Work

Port numbers are associated with network addresses. For example, in TCP/IP networking, both TCP and UDP utilize their own set of ports that work together with IP addresses.
Port numbers work like telephone extensions. Just as a business telephone switchboard can use a main phone number and assign each employee an extension number (like x100, x101, etc.), so a computer has a main address and a set of port numbers to handle incoming and outgoing connections.
In both TCP and UDP, port numbers start at 0 and go up to 65535. Numbers in the lower ranges are dedicated to common Internet protocols (like 21 for FTP and 80 for HTTP).

Port numbers are typically processed by network hardware and software automatically. Normally you will not see them while casually using a network nor need to take any action involving them. However, in these special cases you can work with network port numbers:When You May Need to Take Action with Port Numbers

  • network administrators may need to set up port forwarding to allow the port numbers of specific applications to pass through a firewall. On home networks, broadband routers support port forwarding on their configuration screens.
  • network programmers sometimes need to specify port numbers in their code, such as in socket programming.
  • sometimes, a Web site URL will require a specific TCP port number be included. For example, http://localhost:8080/ uses TCP port 8080. Again, this is more usually seen in software development environments than on the Internet.
For List Of UDP and TCP Port Numbers Please Visit this LINK :


In TCP/IP and UDP networks, a port is an endpoint to a logical connection and the way a client program specifies a specific server program on a computer in a network. Some ports have numbers that are pre-assigned to them by the IANA, and these are called the "well-known ports" which are specified in RFC 1700.
Port numbers range from 0 to 65536, but only ports numbers 0 to 1024 are reserved for privileged services and designated as well-known ports. This list of well-known port numbers specifies the port used by the server process as its contact port.
Port NumberDescription
1TCP Port Service Multiplexer (TCPMUX)
5Remote Job Entry (RJE)
7ECHO
18Message Send Protocol (MSP)
20FTP -- Data
21FTP -- Control
22SSH Remote Login Protocol
23Telnet
25Simple Mail Transfer Protocol (SMTP)
29MSG ICP
37Time
42Host Name Server (Nameserv)
43WhoIs
49Login Host Protocol (Login)
53Domain Name System (DNS)
69Trivial File Transfer Protocol (TFTP)
70Gopher Services
79Finger
80HTTP
103X.400 Standard
108SNA Gateway Access Server
109POP2
110POP3
115Simple File Transfer Protocol (SFTP)
118SQL Services
119Newsgroup (NNTP)
137NetBIOS Name Service
139NetBIOS Datagram Service
143Interim Mail Access Protocol (IMAP)
150NetBIOS Session Service
156SQL Server
161SNMP
179Border Gateway Protocol (BGP)
190Gateway Access Control Protocol (GACP)
194Internet Relay Chat (IRC)
197Directory Location Service (DLS)
389Lightweight Directory Access Protocol (LDAP)
396Novell Netware over IP
443HTTPS
444Simple Network Paging Protocol (SNPP)
445Microsoft-DS
458Apple QuickTime
546DHCP Client
547DHCP Server
563SNEWS
569MSN
1080Socks
For further information, see RFC 1700.