Saturday, February 22, 2014

Rsync and "No password? nah, it'll be fine"

You all know rsync, he is our trusty fellow that is always there to help you transfer your stuff and help you forget how scp and rcp treated you bad in the past. He is fast, he is free and he is really nice... maybe too nice.

As it turns out, our good ol' mate is far too nice sometimes and will let passing strangers move your stuff around as well... allow me to elaborate:

1. What is rsync?

Rsync is a small tool developed back in 1996 that allows the user to copy files from one place to another really fast (it's obviously much more complex than that but lets keep it simple for now). This tool can be used for many things but the most common uses are:
  1. Copy files and folders locally or to an external location (substituting the cp and scp tools respectively)
  2. Automated backups (both local and to remote locations)
  3. Mirrors: same idea as backups, since rsync only copies modified files, you can mirror changes in your web directory by rsyncing with your destination.

2. Sounds awesome, what does this have to do with the post title?

Here comes the tricky part: for connecting to remote hosts you can set up a rsync service (rsyncd) and connect to your remote machine via something like:
rsync rsync://<Domain>/
The problem is: many sites have no password protection at all and are accessible by everyone with access to a console.

A quick search on ShodanHQ shows only a few hundred of the thousands of hosts out there with their shares publicly broadcasted, most of them with no password protection.

3. Oh noes! what to do?

Simple: Use rsync over SSH.

Rsync offers the option of using rsync over SSH, protocol that offers lots of possibilities for encryption (please use SSH v2.0 and, if you can, public keys). The usage kinda goes like this:
rsync -avz -e ssh user@host:/remoteDir /localDir/
Here is a quick explanation of the code above

So, that's it! I hope you've learned something today, remember to secure your shares!

More info:

Tuesday, February 18, 2014

Why are mobile networks 'cellular'?

Everybody is familiar with the word 'cellular'. But, how many of you can actually explain what a cellular system is? And most importantly, can you explain why all mobile technologies are structured this way? In this first post I will try to enlighten you about this topic as a basis for future posts in which I will deal with topics that require a deep understanding of mobile communications.

Mobile technologies, no matter the generation, use the air interface as their transmission medium. More specifically, it is the electromagnetic spectrum what is used to transmit modulated waves containing information. Since electromagnetic spectrum is a very limited resource, and only a little portion of it is reserved for mobile communications, it is necessary to implement some sort of multiplexing in order to maximize the number of simultaneous users. To achieve this, the transmission bands are divided into channels.

GSM bands.

For example, in GSM-900, transmissions can only take place between 890-915 MHz for the uplink, and 935-960 MHz for the downlink. Each of these bands is divided into channels of 200 KHz width. This would only allow 124 concurrent users in the network, which obviously is not enough. This number can be increased by applying time multiplexing (just dividing each frequency channel into time slots), but the result is still far from optimal.

Additionally, it has been said that the channels are 200 KHz width, and this is not strictly true. The fact is that 99% percent of the transmitted power is contained inside a 250 KHz width band. Since the actual channel spacing is 200 KHz, two adjacent GSM channels interfere with each other, making impossible to use these two channels simultaneously. It is pretty obvious this system is not efficient at all.

Public mobile networks must be able to provide service to a large number of users. To cope with the before mentioned problems, a cellular scheme is adopted. This architecture involves dividing the total coverage area of the network into smaller regions or 'cells', each of which is assigned a set of non-adjacent transmission channels different from the ones assigned to neighboring regions. Each cell is controlled by a network entity (i.e BTS for 2G, NodeB for 3G) which is responsible for managing the cell resources.

The main advantage of using a cellular system is the frequency reuse. For a given coverage area, two or more sufficiently separated cells can operate in the same channels without interference. This sort of 'spatial multiplexing' drastically improves the performance of the network, allowing multiple users to share the same resources at the same time. Normally, cells are grouped into clusters, which are frequency distribution patterns that are replicated all over the total coverage area of the network.

7-cell clusters. fi denotes a set of frequencies.

The minimum reuse distance depends on the cell radius and the number of cells per cluster, which typically is 4, 7, 12 or 21. This is a key factor, because the smaller the number of cells per cluster is, the bigger the cell capacity becomes, since there are more channels per cell. On the other hand, smaller clusters are more susceptible to suffer interference from neighboring clusters, so the size has to be balanced.

Cells can be classified regarding to the extension of their coverage area. Macrocells, for example, provide service to large rural areas, while microcells, picocells and femtocells are common in densely populated urban environments.

As a first approach to cellular telephony, this is all for now. In the next post I will focus on the cell concept, explaining its elements, and the logical network divisions derived from it.  

Thursday, February 13, 2014

Welcome everyone!

Hi all!

So, here we are, finally writing our first, proper (this doesn't count) post!

Even though I'm the one typing, I'd like to present the entire team, mainly because they don't want to write this post and are too busy preparing their awesome first posts. Enough babbling, who are you people and what do you want?

Alessandro

Alessandro is our computer scientist, as of today he has finished his degree and is studying a masters degree in Computer/Network security.

Cristóbal

Cristóbal is our true telecommunication engineer (he chose the main branch, antennas and that kind of witchcraft). He came to us from the cold North Oviedo and currently he is finishing his studies (but he's almost done!).

Juanlu

That will be me. I am finishing my telecommunications degree in Telematics engineering in Madrid, and I plan on doing the exact same masters degree Alessandro is doing.

So, what's your story? why the blog?

We created this blog to learn and post about the fields we are specialized on. Alessandro will mainly deal with security, Cristóbal will be responsible for the telecommunication stuff, and I'll show you how magical the networks can be. Our intention is to publish, at least, a couple of posts per week, and the first one is coming soon so... stay tuned!