The Dark Arts: SQL Injection and Secure Passwords

As the year of 2005 was drawing to a close, a website known as Myspace was basking in popularity. With millions of users, the site was the most popular social networking site in the world. It was unique in that it let users use HTML code to customize their Myspace page. Most of us, c’mon…admit it….had a Myspace page. The coding part was fun! But not everything was changeable with code. You could only upload up to 12 images and the Relationship Status drop-down menu only had a few options to choose from. These limitations did not sit well with [Samy Kamkar], a 19 year old hacker out of Los Angeles.

sql_03
Source

It didn’t take [Samy] long to figure out how to trick the site to let him upload more images and change his relationship status to a customized “in a hot relationship”. After hoodwinking the Myspace site with some simple hacks, he realized he could do just about anything he wanted to with it. And this is where things get interesting. It took just over a week to develop a script that would force people who visited his page to add him as a friend. But that wasn’t enough. He then programmed the script to copy itself onto the visitor’s page. [Samy] had developed a self-propagating worm.

The script went live as [Samy] went to bed. He woke up the next morning with 200 friends requests. An hour later the number had doubled. [Samy] got worried and sent an anonymous email to the webmaster warning of the worm. It was ignored. By 1:30PM that day, he had over 6,000 friends request. And like any good hacker worth his weight in floppy drives, his sense of humor had him program the script to also add his name to each visitor’s Heroes List. This angered many people, who deleted him from their page, only to get reinfected moments later when they visited another (infected) page.

[Samy’s] script was raging out of control.  As the evening closed in, his friends count had reached 919,664. It would top the 1 million mark just before Myspace took their servers offline to figure out what was going on. Two hours later, the site was back up. [Samy’s] profile page had been deleted.

[Samy] had used a technique known as cross-site scripting (XSS) to pull off his hack. We’ll touch on XSS in a later article. For now, we’re going to stick to the basics – proper passwords and SQL Injection.

Continue reading “The Dark Arts: SQL Injection and Secure Passwords”

Worlds Collide: Hot Rodders and Hackers

When we think of the average hot rodder, we think of guys and gals that love anything on four wheels. They’re good with hand tools, fabrication and know the ins and outs of the internal combustion engine. Their tools of the trade are welders, grinders and boxed-end wrenches. But their knowledge of electric circuits doesn’t go beyond wiring up a 12 volt DC tail light. On the surface, the role of a hot rodder would seem quite different from that of a hardware hacker. But if you abstract what they do, you find that they take machines and modify their design to make them do something more than they were originally designed to do. When viewed in this light, hot rodders are hackers.
Continue reading “Worlds Collide: Hot Rodders and Hackers”

Ask Hackaday: Selling CAD Prints That Are Not Yours

[Louise] tried out her new E3D Cyclops dual extrusion system by printing a superb model dragon. The piece was sculpted in Blender, stands 13cm tall and can be made without supports. It’s an impressive piece of artwork that reflects the maker’s skill, dedication and hard work. She shared her creation on the popular Thingiverse website which allows others to download the file for use on their own 3D printer. You can imagine her surprise when she stumbled upon her work being sold on eBay.

It turns out that the owner of the eBay store is not just selling [Louise]’s work, he’s selling thousands of other models taken from the Thingiverse site. This sketchy and highly unethical business model has not gone unnoticed, and several people have launched complaints to both Thingiverse and eBay. Now, there are lots of things to talk about here, but the 800 pound high voltage transformer in the room is the legality of the whole thing. What he’s doing might be unethical, but is it illegal?

When [Louise] politely asked the eBay store owner to remove her work, he responded with:

“When you uploaded your items onto Thingiverse for mass distribution, you lost all rights to them whatsoever. They entered what is known in the legal world as “public domain”. The single exception to public domain rules are original works of art. No court in the USA has yet ruled a CAD model an original work or art.”

Most of the uploaded CAD models on Thingiverse are done under the Creative Commons license, which is pretty clear in its assertion that anyone can profit from the work. This would seem to put the eBay store owner in the clear for selling the work, but it should be noted that he’s not properly attributing the work to the original creator. There are other derivatives of the license, some of which prohibit commercial use of the work. In these cases, the eBay store owner would seem to be involved in an obvious violation of the license.

There are also questions stirring with his use of images.  He’s not taking the CAD model and making his own prints for images. He lifting the images of the prints from the Thingiverse site along with the CAD files. It’s a literal copy/paste business model.

With that said,  the eBay store owner makes a fairly solid argument in the comments section of the post that broke the news. Search for the poster named “JPL” and the giant brick of text to read it. He argues that the Thingiverse non-commercial license is just lip service and has no legal authority. One example of this is how they often provide links to companies that will print a CAD design on the same page of a design that’s marked as non-commercial. He sums up one of many good points with the quote below:

“While we could list several other ways Thingiverse makes (money), any creator should get the picture by now-Thingiverse exists to make Stratasys (money) off of creators’ designs in direct violation of its very own “non-commercial” license. If a creator is OK with a billion-dollar Israeli company monetizing his/her designs, but hates on a Philly startup trying to make ends-meet, then they have a very strange position indeed.”

OK Hackaday readers, you have heard both sides of the issue. Here’s the question(s):

1.  Is the eBay seller involved in illegal activity?

2. Can he change his approach to stay within the limits of the license? For instance, what if he credits the                      original maker on the sale page?

3. How would you feel if you found your CAD file for sale on his eBay store?

TV Control With Hand Gestures

The cell phones of yesteryear were covered in buttons. Today’s cell phones are mostly a touch display with maybe one or two buttons. As time marches on, we find ourselves using our fingers more for gestures and swipes than button pushing to control our devices. Sadly, the television remote has been stuck in an antiquated state and most are still covered in archaic buttons.

[Frederick] has decided to dig the TV remote out from the stone age and updated it to use simple gestures for control. We’ve seen gesture control before, but this one is certainly the most elegant. He’s using a Raspberry Pi with a Skywriter HAT gesture recognition board. The driver is super easy to install and can be done in a single command line. The Skywriter hat interpreters the hand gesture and the Pi fires the appropriate signal via an IR emitter. This approach made the project fairly simple to put together, with surprisingly good results.

Be sure to check out his blog for all code needed, and take a look at the video below to see the remote in action.
Continue reading “TV Control With Hand Gestures”

About Those Gravitational Waves

It was the year of 1687 when Isaac Newton published “The Principia“, which revealed the first mathematical description of gravity. Newton’s laws of motion along with his description of gravity laid before the world a revolutionary concept that could be used to describe everything from the motions of heavenly bodies to a falling apple. Newton would remain the unequivocal king of gravity for the next several hundred years. But that would all change at the dawn of the 20th century when a young man working at a Swiss patent office began to ask some profound questions. Einstein had come to the conclusion that Newtonian physics was not adequate to describe the findings of the emerging electromagnetic field theories.  In 1905, he published a paper entitled “On the Electrodynamics of Moving Bodies” which corrects Newton’s laws so they work when describing the motions of objects near the speed of light. This new description became known as Special Relativity.

It was ‘Special’ because it didn’t deal with gravity or acceleration. It would take Einstein another 10 years to work these two concepts into his relativity theory. He called it General Relativity – an understanding of which is necessary to fully grasp the significance of gravitational waves.

Continue reading “About Those Gravitational Waves”

Teaching a CNC New Tricks

Computer Numeric Control technology has been around for a long time. It’s at the heart of our 3D printers, laser cutters / etchers and CNC milling machines. They all work the same way — you begin with a CAD program and make some type of design. Then the computer converts the file into a set of XYZ coordinates and moves a tool head accordingly. Now let us pose to ourselves a most interesting question. What if you reversed the process? What if you could take a CNC’d object and convert it into XYZ coordinates?

This is precisely what [dave] is attempting to do. He’s made a basic CNC outfit and installed encoders on the steppers. He then manually moves the tool head to trace out an object. At the same time, the encoders are feeding the coordinates to a computer for recording. The idea is to replay the coordinates to see if the CNC can replicate the object.

Judging from the video below, the project is a success!

Continue reading “Teaching a CNC New Tricks”

Repairing a MakerBot Mightyboard Clone

It can be argued that MakerBot, a company that makes popular 3D printers, hit its pinnacle with the introduction of the Replicator 2. It was designed well and completely open source, including the motherboard that drove the printer – known as the Mightyboard. China quickly picked up on the success of the Replicator 2 and copy/pasted several of their own versions (at a much cheaper sale price). One of these outfits is called Wanhao, and their version of the Replicator 2 is called..wait for it…the Duplicator!

Their version of the Mighyboard is identical to the original, minus a few nickle and dime components. This suggests that Wanhao made an effort to cut as much cost as possible without looking at what functionality they were removing. And anytime a company does this, you can bet the quality of the board manufacturer is at the bottom of the barrel.   [Avrydev] found this out the hard way when he repaired a faulty motherboard from a broken Duplicator.

The board would not connect to the software via USB, and the startup tune pitch was off. [Arvydev] flashed new firmware via ICSP, but that did not help. He eventually clued in on the main crystal for the Atmega processor. A quick swap and presto! The printer is as good as new.