Recently in Security Category

Windows Command Prompt For Loop

Have you ever needed to do some sort of repetitive task using the Windows command prompt? This is a cool program I really wasn't aware existed. Lets first create a text file name it myfile.txt and put in the following.

a,b,c
3,2,1

Now lets use our for loop.
for /F "eol=; tokens=2,3* delims=," %i in (myfile.txt) do @echo %i %j %k
What this does is pull the 2nd and 3rd value separated by commas from the file. Then echo's them to the screen.
 
This example isn't all that helpful but imagine putting user name and passwords in the file and doing a loop to try and brute for the NET USE password?

Windows NET USE / NetBIOS commands

  • net view /domain
    Lists all domain groups
  • net view /domain:name
    Shows list of all computers within the domain
  • net session
    All systems connected to system

nbtstat - Shows a ton of information about its host, for example. nbstat -a backdesk

Will show:

Node IpAddress: [192.168.1.43] Scope Id: []

           NetBIOS Remote Machine Name Table

       Name               Type         Status
    ---------------------------------------------
    BACKDESK       <00>  UNIQUE      Registered
    WORKGROUP      <00>  GROUP       Registered
    BACKDESK       <20>  UNIQUE      Registered
    WORKGROUP      <1E>  GROUP       Registered

    MAC Address = 00-13-72-CB-1E-86

Looking at the codes provided here, shows that the computer is a workstation server registered, running file service and browser service elections.

Secure your wireless network

In my last post I went over how to add a Linksys router to an existing Internet connection. Now we'll go over how to secure the wireless networks so other people can't use it.

Log into the router

  1. Open Internet Explorer and type in the following address http://192.168.1.1
  2. You will then be prompted for a user name and password, the user name field you can just leave blank and the password is 'admin'.

You are now logged into the router. You can take a look around see the different options in there. We are mainly concerned with the wireless network so click 'Wireless' at the top and then below that click 'Wireless Security'. We are now editing the wireless security settings for your Linksys  router. There are a few choices you can use here, for the sake of keeping this simple I'm just going to use WEP 128bit encryption.

  1. Select WEP encryption
  2. Then select 128 bit encryption
  3. Now you can either type something in key 1 or use a pass phrase to generate it. Easiest way is just to type in numbers in key 1 until you have 26 characters. So for example you could type in 12121212121212121212121212 or whatever
  4. Then hit  'Save Settings'

Now your wireless will need the code 12121212121212121212121212 in order to connect. So lets go to your laptop and do the following:

  1. Hit 'View Available Wireless Networks' by right clicking on the Wireless connection icon in the lower right hand corner of your screen, or its in the Control Panel in Network Connections.
  2. If you were connected before you may have to hit disconnect from the network. If you were not just click on the network name and then hit connect.
  3. You'll have to enter the WEP key twice
  4. Hit OK and you are good to go!

I tried to keep that pretty simple. If you have any questions just leave a comment and I'll help.