Log in

View Full Version : The Feds in my router?


Snatch
June 27th, 2009, 18:32
Way too many theories there but yea I think my router was hacked for wiretapping or something of the sort - any idea how to stop this from happening in the future so the RMAed one doesnt get rehacked?

Woodmann
June 27th, 2009, 19:45
Howdy,

I want some more info to start digging on.

In the mean time, I would lock that rig down, wipe the drive/drives and swap them out. Think about wireless only and NO file swapping.

That is some nasty shit going on. It reeks of "electronic wire tapping".

Better safe then sorry.

Woodmann

Snatch
June 27th, 2009, 20:45
Howdy Woodmann,

I guess I browsed too many conspiracy and reverse engineering sites back in the day and got infected by something (since July 7, 2005). Certainly no file swapping - I think the rig is okay its just the router that is hacked. There is no real reason I would be targeted by any organization so this whole situation is just bizarre.

Woodmann
June 27th, 2009, 21:14
I will start poking around and see what I can find.

You wanna come live in the woods?
If you got money I will throw her out .

Woodmann

Snatch
June 27th, 2009, 23:55
Hah out in the woods sounds nice after all the craziness goin on here tho I like the city a lot Hehe youll get rid of her that easily huh !

Silkut
June 28th, 2009, 05:49
What makes you think your router got hacked ? Can you give hw info ?

Woodmann
June 28th, 2009, 17:23
Quote:
Hehe youll get rid of her that easily huh !


Hmmmmmmm......... how to make this sound like I'm not a prick........

Ya, I'd get rid of her that quick. It's not like I married her or invested money in her.

OK, forget the not sounding like a prick part.

Woodmann

Woodmann
June 28th, 2009, 17:41
snatch,

Is the router wireless?

JMI
June 28th, 2009, 23:15
Not to feed the paranoia unnecessarily, but the folks I worked with in my military service could have easily come in to swap out your router directly, if they were of a mind to, and have it still show the original serial number, etc. They wouldn't actually have had to "send' you something, if they were actually concerned that might be detected. Although, sending you something might be easier and somewhat less risky of discovery.



Regards,

Maximus
June 29th, 2009, 04:59
can you extract/dump your current router firmware? I'm interested into giving it a look (btw, which model/version/firmware version you have? Have you checked if there are known exploits about)
Also, often routers has an hidden console mode you access i.e. at :8080 or by wiring it with a interface cable (eventually hidden under some plastic).

BanMe
June 29th, 2009, 18:00
this sounds to me to be a variant of the dnschanger.glob variety.

can you goto microsoftupdate? or any of there partner sites.

if you can't then its time to remove all DNS entries on your router and set it to autoconfig.

if this fails most routers have a flash update feature included in them, just goto the manufacturer and download the newest one and flash it.

if this also fails .. junk the router.. :[

evaluator
June 30th, 2009, 14:20
"at my understands"
Snatch will not share info, you requested.

***
Unpacking Minds!

BanMe
June 30th, 2009, 17:38
I understand alot of what you say evaluator, but 1/4 of the time..I'm just lost.. :/

disavowed
June 30th, 2009, 18:27
BanMe, i think evaluator is saying that Snatch still hasn't explained why he thinks his router got hacked.

Woodmann
June 30th, 2009, 20:29
Hey everyone,

BanMe is learning how to compile eval+++ .

Snatch, were waiting.......

Aimless
July 1st, 2009, 04:26
I think its prolly a freak data burst. Nothing more. And how do you define "hacked a router". Hacked it to do what? Serve as the hub for zombie processes or as a launching pad for the latest defacing of NASA or somesuch?

In all probability its nothing.

Then again, maybe you've been reading too much Phrack.

Have Phun

WaxfordSqueers
July 1st, 2009, 07:10
Quote:
[Originally Posted by Snatch;81340]...I think my router was hacked.... - any idea how to stop this from happening in the future....?
I'm not following you. Was it a wireless router and do you think you got hacked through the air? If so, you need to look at your security on the router. An unsecured wireless router can be infiltrated by a neighbour down the block or someone parked outside your house with a laptop and a wireless setup. There are apps out there that allow them to break wep security.

You need wpa security at least and a real, long password. You can set your wireless router to use only the MAC addresses you prescribe so no one can attack your router by spoofing MAC addresses.

I use a Cisco Linksys wireless and it can be accessed with IP 192.168.1.1. That brings up a config screen in which you can set security. Cisco offers quite a good explanation on their site. I would guess that most users know nothing about security on wireless and run with the stock security password which everyone knows. With that password, it's just a matter of logging on for free internet on someone else's wireless.

Some business woman from a large US magazine was bragging how she uses that when she's out of town. You just bring up your Linksys config screen and it shows all the neighbourhood wireless sets. If the sets are using wep security, or the stock password, anyone can access them.

If you're on a landline connection, the stock anti-hacking principles apply. Use a good firewall and close your ports. There's no need for any ports to be open other than your IP line port and there's no need for any app to be calling out. With the free Sygate firewall, still floating around, even though Symantec bought them out because their products are crap, you can run in stealth mode and no one can even see you. You can also stop any program calling out.

The Linksys router has an additional hardware firewall built in, so that's two firewalls in a row for hackers to negotiate. If you're into it, buy a dedicated hardware firewall that can be configured.

WaxfordSqueers
July 1st, 2009, 07:18
Quote:
[Originally Posted by Woodmann;81342]....and NO file swapping
I guess many people still don't know that when you use a torrent, your IP address is front and centre for the entire world to see. That's especially true if you remain on line, as a good file-swapping citizen, to let others d/l. You can bet file-swapping is closely monitored by the DRM boys.

Snatch
July 1st, 2009, 11:52
Okay I think people cleared it up.

arc_
July 1st, 2009, 14:43
This really looks like nothing at all to me. What's with the screenshot, it shows the firmware upgrade page, so what?
I also took a quick look at your wireshark captures. The first one, hacked5.pcap, shows communication with 64.12.194.119 which is the IP of smtp-mb.mx.aol.com (see http://samspade.org/whois/64.12.194.119). An AOL mail server...
And the second capture is a bog standard SSDP broadcast to the standard multicast address (http://en.wikipedia.org/wiki/Simple_Service_Discovery_Protocol). It's your router letting machines on the local network know what kind of UPnP services it offers.

I didn't bother looking at the other captures. And Worms being used to train government spies, and "classified forearm problems"? Oh come on.

BanMe
July 1st, 2009, 15:03
yea I smoke alot of pot, but damn man you might need to lay off of it for a while...and ive also expierenced strange intense headaches my whole life, but I still dont think i have a implant in my head...and if smoking pot makes you paranoid, it is a effect of the environment and society in which you smoke it..i.e. I wasnt paranoid smoking in amsterdam but i am back in the states..hmm the only thing that changed is the "location"..

regards BanMe

Snatch
July 1st, 2009, 15:31
Sorry - I have been so busy moving and doing all this other stuff I have not had time to sort through. Maybe I am just paranoid :/.

arc_
July 1st, 2009, 15:36
First Google result for "fakepath": http://www.mail-archive.com/whatwg@lists.whatwg.org/msg14076.html

It's actually a browser feature. I suggest you do some more research before making alarmed posts like that.

Snatch
July 1st, 2009, 15:50
Thanks arc I was looking for router hack examples and not fakepath.

Woodmann
July 1st, 2009, 18:39
Cmon,

Ease up on Snatch. He had a legitimate concern.
If the router was running wireless with no encryption,
it could have very easily been hacked.

I was really hoping it was hacked .
Not so bad things would happen to Snatch,
just for the learning experience.

Woodmann

Snatch
July 1st, 2009, 18:48
Yup - I guess my conclusion from all of this is there is no real way to tell if your router is hacked or not without taking out the firmware chip and dumping it. Fixing it would require direct reprogramming of the firmware chip.

WaxfordSqueers
July 1st, 2009, 20:13
Quote:
[Originally Posted by Snatch;81468]....there is no real way to tell if your router is hacked or not without taking out the firmware chip and dumping it.

You seem to have a misunderstanding of how routers work. They are nothing more than a digital switch that "routes" data from multiple computers into a central region. The way they are used in homes is normally to route data to and from the Internet to several computers.

In busineses, they are used to interconnect computers in a star shape. The older method was a ring shape, where each computer was on a serial-type connection. The data was passed from computer to computer with a data 'token' and each computer had a unique address. The token would contain the address of the target computer and would travel around the token ring till it found the target computer.

Routers in homes can use cables to connect computers directly and another cable to connect to a modem, then onto the Net. Of course, if they are wireless, each computer has an adapter that can send and receive data via an antenna, and the router has an antenna as well for sending/receiving. A hacker can't just take over your router and get into your computer unless he has the MAC address of the adapter in each computer.

It's easy for him to get the MAC address of the router since it's stupidly displayed on the Internet for everyone to see. BTW, the MAC address is the unique address of components attached to a network and that applies to wired connections as well. There are provisions in a decent router to restrict the MAC addresses available to a hacker. AFAIK, there's no way for a hacker to reach your firmware and diddle with it unless you leave it unprotected.

Between the router and each computer on a wireless setup, there are provisions to encrypt the data being transmitted. The low end encryption is called WEP and it has already been hacked. In fact, there's a program on the Internet that allows script kiddies access to any WEP-protected setup. WPA encryption is another matter. Although some people think it's hackable, they don't specify how long it would take them, which would probably be weeks at 24/7. The next level is WPA2, but it's not available on every system.

Any wireless tranmission can be picked up a block away in some cases, but definitely on the street in front of your home. If it's not encrypted, anyone with a laptop and ethereal can pick up your packets and get vital information. They can also send data to your system to hack it. If the wireless broadcast is encrypted with WPA, that's highly unlikely because of the time it would take for a really good hacker to break the code. No one is going to sit in front of your residence for that amount of time, but a neighbour in a nearby apartment might.

That encryption can be turned off in the router firmware, so it's imperative that a potential hacker be prevented getting at your router firmware. The protection is a password, which I think can be up to 64 characters long. Cisco claims that if you use a good, long password and setup your router to restrict MAC addresses, you 'should' be alright.

Anyway, if you look at the wireless networks available in your vicinity, using a monitor, you can select which one you want to connect to. If you try one, it asks for a password. The stock password for a Linksys router is something like admin, and if the router is unprotected, you can connect directly to the router.

Once a hacker gets in, he is free to go onto the Net for nefarious purposes, or to try getting into your system. There are other ways to get in, even on a completely wired system but protection from that is getting back to basics, like a good firewall properly set up. You should also test your password from time to time because when the router resets after a power failure, it may revert to the stock password. I have not seen that happen on mine but I have inadvertantly reset the router firmware to it's stock settings.

dELTA
July 2nd, 2009, 04:38
Actually Waxford, it's a little more complicated than that. Routers today are based on quite complex software (firmware) running on a generic processor. They also have quite complex functionality, often running several network exposed services of different kinds. As with any other software dealing with input coming from the outside, they may very well have security vulnerabilities that enable an attacker to compromise them even from locations where the "firewall rules" or whatever really shouldn't allow them to. This, combined with the ability of the router software to be updated by design (firmware update), is a combination that can absolutely lead to full compromise of the device, letting it execute a manipulated "operating system" that e.g. could eavesdrop on all your communications and forward their data (or chosen parts of it) to a third party, or tamper with it man-in-the-middle style or whatever. There are even well-known instances of certain router types having these kinds of vulnerabilities that have been exploited on a relatively massive scale, to create a "botnet" or compromised routers, acting under the command of hackers, while at the same time concealing this for their owners. Finally

What people have been objecting against in Snatch's case I think, is rather the seemingly rather loose, lacking or misunderstood grounds and evidence on which he has explained to base this suspicion (and in the later posts, which have been partly edited now by himself, the somewhat incoherent and paranoid unrelated ramblings).

WaxfordSqueers
July 2nd, 2009, 08:35
Quote:
[Originally Posted by dELTA;81474]....it's a little more complicated than that. Routers today are based on quite complex software (firmware) running on a generic processor.
The routers I have encountered, both professionally and at home are a lot simpler than that. I'm aware that call centres and other IT domains use far more sophisticated devices because they have to be configurable for the large networks they are used on. The routers I am talking about are the simple Linksys variety and the simple modules used as digital switches in basic office environments.

I have never subscribed to the notion that any system exposed to the Net is ultimately safe, firewalls or not. By the same token, I think there's a lot of nonsense surrounding the mystique of the super-hacker lying in wait for the unwary. I'm sure there are some really good hackers out there but it has to be acknowledged they are not supermen. There comes a point where you simply cannot get into a system.

There's also the stupid factor. I contacted my bank recently with my concern about keyloggers. The guy enthusiastically explained 128 bit encryption and I asked the obvious: what happens if the keylogger gets the data before it's encrypted? There was silence on the other end of the line then a quick, "can you hold the line for a moment". He went and asked the next level up and they had no idea what I was talking about.

People who design this stuff are lacking in basic intelligence. As I revealed about Linksys, why is it necessary for them to broadcast a MAC address to anyone with a wireless monitor? Why was the Linksys left with a common generic password, unless it was changed by the user? Why do businesses leave basic security information exposed for hackers? Why did Bill Gates offer the entire world access to everyone else's computer. What was he thinking about with Messenger and all that crap?

If you look at this article:

http://www.securityfocus.com/infocus/1734

about someone explaining vulnerabilities in a Cisco router, you have to shake your head at the stupidity. The guy even admits the situation has to be right to do the exploits and on another occasion, he talks about passwords that can be found in a common dictionary. That's how hackers get into systems, through the stupidity of others, either in the design or in the usage.

He goes on to talk about brute-forcing, a technique that works only on dictionary attacks and stupid vulnerabilies. I was playing with a password brute-force app and it's good for up to about 5 or 6 characters. If you use 12 characters, there wouldn't be enough lifetimes to brute-force the password.

Why are hackers even allowed to gain access to unencrypted data transmissions? With the heavy duty encryption systems we have, why is all data communication not heavily encrypted? There's no way anyone should be able to read data with ethereal or anything else, yet the guy in this article is bringing out one tool after the other that gets info from data transmissions.

dELTA
July 2nd, 2009, 10:21
Quote:
[Originally Posted by WaxfordSqueers;81482]The routers I have encountered, both professionally and at home are a lot simpler than that. I'm aware that call centres and other IT domains use far more sophisticated devices because they have to be configurable for the large networks they are used on. The routers I am talking about are the simple Linksys variety and the simple modules used as digital switches in basic office environments.
They might look simpler than that, but they actually aren't in very many cases. A large part of them are actually running some kind of Linux operating system under those green blinking diodes (including practically all of those that can be firmware upgraded).

It's quite funny you should mention Linksys home routers as a (counter) example too, since these were actually the first and primary target of one of the worms I mentioned above (even though later versions of the worm targeted and compromised several other brands of light-weight/home network equipment too, e.g. Netgear), infecting, reprogramming and taking control of network devices, namely the Psybot worm/botnet. Read more here for example:

http://blogs.zdnet.com/BTL/?p=15197


Quote:
[Originally Posted by WaxfordSqueers;81482]I have never subscribed to the notion that any system exposed to the Net is ultimately safe, firewalls or not. By the same token, I think there's a lot of nonsense surrounding the mystique of the super-hacker lying in wait for the unwary. I'm sure there are some really good hackers out there but it has to be acknowledged they are not supermen. There comes a point where you simply cannot get into a system.
Mightn't it be considered a little contradictory to first say that you don't believe any system to be ultimately secure, and then in the next sentence say that there comes a point where they are?


Quote:
[Originally Posted by WaxfordSqueers;81482]There's also the stupid factor. I contacted my bank recently with my concern about keyloggers. The guy enthusiastically explained 128 bit encryption and I asked the obvious: what happens if the keylogger gets the data before it's encrypted? There was silence on the other end of the line then a quick, "can you hold the line for a moment". He went and asked the next level up and they had no idea what I was talking about.

People who design this stuff are lacking in basic intelligence. As I revealed about Linksys, why is it necessary for them to broadcast a MAC address to anyone with a wireless monitor? Why was the Linksys left with a common generic password, unless it was changed by the user? Why do businesses leave basic security information exposed for hackers? Why did Bill Gates offer the entire world access to everyone else's computer. What was he thinking about with Messenger and all that crap?

If you look at this article:

http://www.securityfocus.com/infocus/1734

about someone explaining vulnerabilities in a Cisco router, you have to shake your head at the stupidity. The guy even admits the situation has to be right to do the exploits and on another occasion, he talks about passwords that can be found in a common dictionary. That's how hackers get into systems, through the stupidity of others, either in the design or in the usage.

He goes on to talk about brute-forcing, a technique that works only on dictionary attacks and stupid vulnerabilies. I was playing with a password brute-force app and it's good for up to about 5 or 6 characters. If you use 12 characters, there wouldn't be enough lifetimes to brute-force the password.

Why are hackers even allowed to gain access to unencrypted data transmissions? With the heavy duty encryption systems we have, why is all data communication not heavily encrypted? There's no way anyone should be able to read data with ethereal or anything else, yet the guy in this article is bringing out one tool after the other that gets info from data transmissions.
There are several problems related to insecure design, and in many cases also pure mistakes, when it comes to security vulnerabilities. Economy of design/implementation also plays a big role (especially regarding your "why isn't everything encrypted" comment). A big problem is that these "mistakes" can be made on any level, not just by the user, but often also by the programmer or designer on some level, making it out of reach to fix by user-level config or whatever. Just as with the Linksys home router example above actually.

Stupidity and mistakes will always exist. Combined with what I explain above, it means that you really shouldn't assume that you're secure just because you are, or consider yourself to be, smart and security-minded, just a tip.

PS.
One of the things I do for living is being a professional penetration tester. You would be scared if you knew the extent of insecurities around you, including in important places.

WaxfordSqueers
July 2nd, 2009, 21:34
Quote:
[Originally Posted by dELTA;81492]Mightn't it be considered a little contradictory to first say that you don't believe any system to be ultimately secure, and then in the next sentence say that there comes a point where they are?
My life is a contradiction, delta, so I don't let it be an issue.

I understand the contradiction I expressed but I come about it honestly. Who really knows what the security issues are? If there were readily identifiable holes in router security, and nothing was done to patch them, then that's a stupidity factor, not a security issue. As you say, cost comes into it, but that should not be an issue where security is a priority.

My statement was about the unknown factor versus the known. Hackers prey on issues they discover and exploit, and I'm aware many people do that as a favour, so good on them. I am claiming that complete security is available with known issues, yet I am aware that not all security issues are known, or even understood. The contradiction is built in.

Quote:
[Originally Posted by dELTA;81492]A big problem is that these "mistakes" can be made on any level, not just by the user, but often also by the programmer or designer on some level, making it out of reach to fix by user-level config or whatever.
Do you think part of the problem may be what we encounter regularly in RE, with over-bloated code and programmers who are hung up in conceptual worlds? I related my story on here once about Bjarne Stroustrup, the inventor of C++. I had struggled trying to understand the concept of class in C++, encountered an array of mind-boggling explanations. Finally, while reading Stroustrup, I received illumination. He said, "a class in C++ is a user-defined type". Why do so many authors struggle with such a simple concept? I think there are a lot of programmers out there who live in a conceptual world and don't understand the reality of hardware or data transmission.

As I trace through code, I find long code sections repeated, sometimes 3 or 4 times in a row. It's pure redundancy, no doubt spat out by the over-bloated compilers and probably by people writing bad code. It would seem the concept of modular programs has created code monsters. Systems get so complex that the designers are probably lost, leaving the hackers drooling.

Quote:
[Originally Posted by dELTA;81492]Stupidity and mistakes will always exist. Combined with what I explain above, it means that you really shouldn't assume that you're secure just because you are, or consider yourself to be, smart and security-minded, just a tip.
If I gave the impression that I feel secure online, I need to clear that up. I had used online banking for several years till recently. I stopped because even major banks cannot guarantee your safety. They offer to replace your losses if you are protected by anti-viral junk but they don't even begin to understand how useless that crap is and what a burden it is on your system. If you run without it, you take the hit for any theft that happens online, yet they don't have the faintest clue about keyloggers and how they work.

Can you imagine trying to explain a rootkit or a keylogger in court, especially with a smartass lawyer using the corrupt logic that courts love? Who in this world, besides gurus like Matt Pietrek, Russinovich, Salomon and a handful of others really understand the internals of Windows? Just looking at the garbage underlying the design in Wondoze reveals a lot of people who have trouble thinking, let alone designing. Some of the design in Windows is just downright bizarre, so what hope have we for something much simpler, like a router.

Although you claim the firmware in a router is complex, it doesn't have to be that way. The hardware is fairly simple as digital hardware goes. The complexity comes in the different layers of transmission protocol, no doubt created by the abstract thinkers I mentioned earlier. Those protocols are realized by bits added to a package and stripped in various parts of a router. At a hardware level, that's not very hard to implement, but the software explanation leaves a person's head sore.

There are people out there talking an abstract language I don't want to understand. When they start calling code an object, and a subroutine a method, or whatever the different languages come up with, it adds an unecessary level of complexity to security. Code in itself is enough of an abstraction since computers work on voltages, not data. It was bad enough with assembler mneumonics, now they have abstracted it to mental concepts that have little or nothing to do with the hardware.

I think that's where the problems are in security. It's far too complex with the current jargon. When systems are designed based on abstraction, with little consideration given to hardware, no one really knows what's going on at a base level. Hackers do because they live in that domain.

WaxfordSqueers
July 2nd, 2009, 21:51
Quote:
[Originally Posted by dELTA;81492]Read more here for example:
http://blogs.zdnet.com/BTL/?p=15197


Thanks for article, delta. The first thing I noted was how the worm infects the Linksys router....it uses a dictionary attack to get the password. It has only 65,000 entries so it looking for really simple passwords. There's no way it will get access with a 12 byte password that is carefully assembled. The article also laments that most routers have no implementation for blocking repeated password attempts. More stupidity.

Here's another article from the same site on securing a Linksys router:

http://blogs.zdnet.com/soho-networking/?p=111&tag=rbxccnbzd1

It claims, as I pointed out, that the use of a strong password in a Linksys router, and WPA security, is virtually impregnable. Worms have no magical powers; they can't infect what they can't access. People have the mistaken assumption that a virus can wriggle it's way into your firmware or into your system. Even a simple step such as securing your system and bios with a strong password could go a long way to keeping all of them out.

On the other hand, if you surf the net, going to naughty places, and you click on something that uses activex or java, you invite malware into your system. That's another matter.

dELTA
July 3rd, 2009, 05:22
The article (or maybe another Psybot article, don't remember) also mentioned that the first round of Linksys attacks were made possible due to a firmware developer mistake, leaving a telnet admin interface available from the outside of the router, which was not meant to be to begin with. Even though worms and hackers are in no way magical, developers may have opened a way in that is very hard, or even impossible for yourself to know about, or even do something about. This is also the case with most buffer overflow vulnerabilities etc.

Oh, and about the complex concepts and language you mention, it is a two-sided problem. The human brain needs higher abstraction levels when dealing with larger systems or concepts, because it is unable to keep track of large volumes of things, even if these things are simpler in themselves. I.e., if all systems were to be handwritten in assembler, it's absolutely not sure that they would be more secure than if written in high level object oriented languages etc, since people would then have much more opportunities to make mistakes, and in a certain percentage of these opportunities, they would. I.e. abstraction can be very good too, in order to get you as a programmer to focus on what you're there for, and let a computer do the rest, which won't make a mistake x% of the time. Low-level knowledge on the other hand is still always good to have with you in the back of your head, no matter what abstraction level you're working on, and I guess that's why we're here.

disavowed
July 4th, 2009, 01:33
Quote:
With the heavy duty encryption systems we have, why is all data communication not heavily encrypted?

Usually one of two reasons: backwards compatibility with systems that don't support encryption, and/or arguments that encrypting and decrypting slows down communication.
Quote:
"a class in C++ is a user-defined type"

That's not even close to being accurate. A user-defined type is a typedef. A class is something completely different. Decent definition and explanation at http://en.wikipedia.org/wiki/C%2B%2B_classes ("http://en.wikipedia.org/wiki/C%2B%2B_classes") if you're interesed.
Quote:
Why do so many authors struggle with such a simple concept?

Probably because it's not actually a simple concept
Quote:
[banks] don't have the faintest clue about keyloggers and how they work.

I assure you the key players working at banks understand keyloggers quite well. Just because the support people you spoke with on the phone are idiots, doesn't mean that the people responsible for security at the bank don't understand it.
Quote:
When they start calling code an object

I haven't come across anyone stating this, but if I did, I'd slap them.
Quote:
I think that's where the problems are in security. It's far too complex with the current jargon. When systems are designed based on abstraction, with little consideration given to hardware, no one really knows what's going on at a base level.

As a full-time security consultant, I can assure you that most computer security issues are not because of jargon; they're because of insecure designs or insecure implementations. Now I suppose you could argue that confusing jargon could cause developers to misunderstand designs and implement something insecurely, but I'm not sure I'd buy into that argument. As for an understanding of hardware, it really doesn't matter all that much for securely designing and developing software these days. Otherwise, compiling the same source code for different platforms would introduce security issues (OK, this of course *can* happen, but it's very uncommon).

Oh, and FWIW, many Linksys routers ship with Linux running their embedded environment.

Woodmann
July 4th, 2009, 19:22
Shit, I guess I better lay off the weed.

WaxfordSqueers
July 4th, 2009, 19:56
Quote:
[Originally Posted by dELTA;81521]Oh, and about the complex concepts and language you mention, it is a two-sided problem. The human brain needs higher abstraction levels when dealing with larger systems or concepts, because it is unable to keep track of large volumes of things, even if these things are simpler in themselves. I.e., if all systems were to be handwritten in assembler....
I understand your point and agree with you. That's not what I'm talking about, however. Modern programmers 'seem' to have been raised on abstraction as a thought process. They seem incapable of relating to the underlying hardware or to the reality the programs represent.

I'll give you one really good example from the global warming issues we face today. The entire notion that we face a crisis of some kind based on human-emitted carbon dioxide, is based on computer programs (models). The models are based on algorithms which are themselves based on a universal equation which encompasses basic physics such as gas laws. They have divided the world into volumes with bases of about 250 miles square and heights extending to the stratosphere. Into those volumes they have programmed what they 'think' to be the way the atmosphere operates.

Meanwhile, a team at the university of Alabama (UAH), has been studying data from satellites that measures atmospheric temperatures directly. The satellites are run by NOAA, and the UAH team (John Christy and Roy Spencer) have been studying the data for 30 years and they are a thorn in the side of the AGW (anthropogenic global warming) paradigm. The data from direct measurement completely opposes the predictions of the models. According to UAH, global warming stopped 10 years ago and the globe has been cooling the past three years. That is corroborated by data from weather balloons.

How can that happen? One way it can happen is what we are talking about...abstraction. When people try to define a complex problem like atmospheric phenomena, and program that into a computer, a certain license has to be taken with physics. When you have mathematicians, computer programmers, astronomers and geologists (even a biologist) trying to apply basic physics in computer programs, and they are trained in the concept of abstracting a reality, there is a tendency to abstract the underlying physics to the point where it is not applied correctly.

One of the basic physics principles that has been abstracted is the heat absorption and re-emission of carbon dioxide (CO2). There is no arguement in physics that CO2 absorbs infrared radiation (IR) and re-emits it but the notion that it can do that on a large scale, particularly given that anthropogenic CO2 (ACO2) makes up about 0.0016% of the atmosphere, is not correct. The model of CO2 as a heat trapping blanket is purely a metaphor created by over-zealous environmentalists trying to sell a point at the expense of good science.

This is just one example of large-scale computer programming abstraction gone astray. You simply cannot program reality into a computer using universal equations and expect it to be accurate. When you compound that with the thought processes of programmers who are already alienated from reality through their education in programming languages, you get what we have today: a paradigm that is immature being foisted on a naive public as reality.

The fact that most people programing these computers believe their product is correct, while directly observed data is wrong, is ample proof that we are dealing with corruption in the human thought process. The basis of science is skepticism, yet anyone who does not accept this abstracted virtual science is considered a skeptic with the connotation that skepticism is wrong, or misdirected. The very fact that the United Nation's IPCC (Intergovernmental Panel on Climate Change) would accept virtual science over directly-observed data, and that a majority of world leaders would readily adopt that rhetoric, is an indication of how abstracted and corrupt our thought processes have become.

WaxfordSqueers
July 4th, 2009, 20:23
Quote:
[Originally Posted by disavowed;81537]That's not even close to being accurate. A user-defined type is a typedef. A class is something completely different. Decent definition and explanation at http://en.wikipedia.org/wiki/C%2B%2B_classes if you're interesed.
I'm going to refer you to 'the man' himself, Bjarne Stroustrup. He's the guy who invented C++ and who is still actively involved in it's current status. Here's what he has to say, from his book, 'The C++ Programming Language' (3rd edition):

"The key concept in C++ is class. A class is a userdefined type. Classes provide data hiding,guaranteed initialization of data, implicit type conversion for userdefined types, dynamic typing, usercontrolled memory management, and mechanisms for overloading operators. C++ provides much better facilities for type checking and for expressing modularity than C does. It also contains improvements that are not directly related to classes, including symbolic constants, inline substitution of functions, default function arguments, overloaded function names, free store management operators, and a reference type. C++ retains C’s ability to deal efficiently with the fundamental objects of the hardware (bits, bytes, words, addresses, etc.). This allows the userdefined types to be implemented with a pleasing degree of efficiency".

Note how he let it slip that objects are actually bits, bytes, etc. I realize the concept of an object is broader, but why mess with the known?

The link you provided is typical of books written on C++, they talk around what a class is and simply talk about it. That is the hallmark of poor English and something you are taught about in first year university English. I'm finding more of that in modern texts, where people simply cannot communicate the basics of languages like C++, probably because they don't fully understand the basics.

According to Stroustrup, a class is no different than a structure with the exception that a structure has a clear definition and that a class is defined by the user. If I remember correctly, that's the overall advantage of C++, it overcomes the inherent restriction in the C language by allowing the programmer more of a say in the implementation of the language. Rather than have types defined for you, like a structure or a union, you can define the type as you like.

Quote:
[Originally Posted by disavowed;81537]I assure you the key players working at banks understand keyloggers quite well. Just because the support people you spoke with on the phone are idiots, doesn't mean that the people responsible for security at the bank don't understand it.
Why haven't they done anything about it? There has been talk about an encryption device that would plug in between the keyboard and the system, but where is it?

Quote:
[Originally Posted by disavowed;81537]As a full-time security consultant, I can assure you that most computer security issues are not because of jargon; they're because of insecure designs or insecure implementations. Now I suppose you could argue that confusing jargon could cause developers to misunderstand designs and implement something insecurely....
That has been my point. We've lost touch with the hardware. When we invented machine language, we started to lose it. I studied Fortran close to 30 years ago, but at least we still talked about subroutines, that are indicative of how processors work. Today, they talk about 'objects'. They can't even use the word 'code' anymore.

Woodmann
July 4th, 2009, 21:02
Well........

After reading all of this again (whilst drinking many beverages),
I have a few thought's.

The Feds can be anywhere at anytime AND most times they are.
Is there any way to stop it? Probably not.
Could they be in the fake Snatch's router? Sure they can.
Were they in the fake Snatch's router? Probably not.

There are way to many variables involved here.
Is Snatch the real Snatch or the fake Snatch?
Is that really his router we SAW in the screen shot?
Does he smoke too much weed?
Is he a plant? Is he deep UC? Is he a tool for the Masons?
Is he covert for the Illuminati?
Does he use butter or margarine?
Toilet paper over or under?
Has he been used by the man to perpetrate a fraud against humanity?

This and many more chilling questions when we resume the continuing saga of:

Who The Fuck is in my router .

disavowed
July 5th, 2009, 00:11
Quote:
[Originally Posted by WaxfordSqueers;81564]A class is a userdefined type. Classes provide data hiding,guaranteed initialization of data, implicit type conversion for userdefined types, dynamic typing, usercontrolled memory management, and mechanisms for overloading operators.


Yes, that second sentence makes it much more than just a userdefined type

Quote:
[Originally Posted by WaxfordSqueers;81564]Note how he let it slip that objects are actually bits, bytes, etc.

Actually, he doesn't say that
He says, "C++ retains C’s ability to deal efficiently with the fundamental objects of the hardware (bits, bytes, words, addresses, etc.)." That's C++ the langauge he's talking about; he's not talking about what objects are made of. And the reason is that objects don't have to be made of bits and bytes.. it's up to the compiler to decide how to implement them. One could create a compiler that stores object data in string format in a SQL database. That's why abstractions exist, because often times there are many ways to do the same thing.

Quote:
[Originally Posted by WaxfordSqueers;81564]According to Stroustrup, a class is no different than a structure with the exception that a structure has a clear definition and that a class is defined by the user.

I don't understand your reasoning here. User can define structures. Furthermore, users can clearly define classes.

Quote:
[Originally Posted by WaxfordSqueers;81564]Why haven't they done anything about it? There has been talk about an encryption device that would plug in between the keyboard and the system, but where is it?

Just because you haven't seen anything doesn't mean that nothing is being done about it. The major problem is that there's no perfect solution that is cheap and easy to implement and distribute. If you can think of such a solution though, you could probably get quite rich by selling your idea to the banks

WaxfordSqueers
July 5th, 2009, 00:54
Quote:
[Originally Posted by disavowed;81568]Yes, that second sentence makes it much more than just a userdefined type
He says it more succinctly here:

"C++ language provides you with some built-in types, such as char, int, and double. A type is called built-in if the compiler knows how to represent objects of the type and which operations can be done on it (such as + and -) without being told by declarations supplied by a programmer in source code.

Types that are not built-in are called user-defined types(UDTs). They can be standard library types - available to all C++ programmers as part of every ISO Standard C++ implementation - such as string, vector, and ostream...., or types that we build for ourselves, such as Token and Token_stream

Why do we build types? The compiler does not know all the types we might like to use in our programs. It couldn't, because there are far too many useful types - no language designer or compiler implementer could know them all. We invent new ones every day. Why? What are types good for? Types are good for directly representing ideas in code. When we write code, the ideal is to represent our ideas directly in our code so that we, our colleagues, and the compiler can understand what we wrote. When we want to do integer arithmetic, int is a great help; when we want to manipulate text, string is a great help; when we want to manipulate calculator input, Token and Token stream are a great help.....

We want to represent such an "idea" or "concept" in code as a data structure plus a set of functions. The question is: "Exactly how?"..... C++ provides two kinds of user-defined types: classes and enumerations. The class is by far the most general and important, so we first focus on classes. A class directly represents a concept in a program. A class is a (user-defined) type that specifies how objects of its type are represented, how those objects can be created, how they are used, and how they can be destroyed. If you think of something as a separate entity, it is likely that you should define a class to represent that "thing" in your program. Examples are vector, matrix, input stream, string, FFT (fast Fourier transform), valve controller, robot arm, device driver, picture on screen, dialog box, graph, window, temperature reading, and clock".


Quote:
[Originally Posted by disavowed;81568]Actually, he doesn't say that
He says, "C++ retains C’s ability to deal efficiently with the fundamental objects of the hardware (bits, bytes, words, addresses, etc.)." That's C++ the langauge he's talking about; he's not talking about what objects are made of.
I hear you and I did state that the focus of an object was broader than just bits and bytes. When you come down to it, though, objects are just collections of code statements. You would never know that when you read many books on C++. They make everything unnecessarily complex.

I don't know how old you are, but when I was studying a limited amount of programming years ago, things were much more clear than they are today. For some reason, it was decided to obfuscate programming, no doubt by geeks, for geeks.

Mathematicians are just as bad. If a simple explanation will suffice for undergraduates, they will insist on presenting bafflegab that would only appeal to the most dedicated of mathematicians. For an undergraduate, three dimension visualization in calculus is adequate for most purposes but math is taught as if putting the notion in the undergraduate's mind that 3-D representations will lead to the dummy thinking that's all there is. So, they present all-encompassing descriptions of basic calculus that confuse more than clarify.

Quote:
[Originally Posted by disavowed;81568]And the reason is that objects don't have to be made of bits and bytes.. it's up to the compiler to decide how to implement them. One could create a compiler that stores object data in string format in a SQL database. That's why abstractions exist, because often times there are many ways to do the same thing.
Ultimately they do. A processor only understands bits and bytes in the form of electrical impulses. That's the reality. I think that people programming in high level languages, especially those teaching it, should bear that in mind. Stroustrup seems to be keenly aware of that when he teaches C++ and that's why I enjoy reading him so much. He doesn't hide behind abstraction, he explains it in simple terms.

I understand the reason for abstracting programs but it seems to go too far at times. It has gone so far that most authors I have read on C++ can't explain simple concepts. Richard Feynman lamented that in university. He would not give a physics lecture unless he could explain a concept in words. Most profs would be lost doing that.

In RE, it helps to stop and ask yourself what the code is trying to do. In fact, that sometimes applies in general to life. What the heck am I trying to accomplish? Many times the answer to that lies deep in emotions and we do things driven by a feeling rather than as something we enjoy doing. In programming, I think it's very important for the beginner to understand what is being accomplished rather than filling his head with abstracted concepts.

You see the effect of that in university. People come out of there not really understanding what they have learned. When I was studying, one guy went two years before he realised that the L in (L di/dt) was a physical device...an inductor. I worked for a graduate engineer who could not draw transistors in a drawing correctly.

Quote:
[Originally Posted by disavowed;81568]I don't understand your reasoning here. User can define structures. Furthermore, users can clearly define classes.
I am in no way trying to present myself as an expert. You know far more about it than I do. However, you can type in STRUCT in a C++ program and the compiler will know what you mean. Is that true for CLASS?

WaxfordSqueers
July 5th, 2009, 01:00
Quote:
[Originally Posted by Woodmann;81565]Well........
After reading all of this again (whilst drinking many beverages),
I have a few thought's.
That kind of philosophy is way over my head.

disavowed
July 5th, 2009, 01:26
Quote:
[Originally Posted by WaxfordSqueers;81569]I don't know how old you are, but when I was studying a limited amount of programming years ago, things were much more clear than they are today.

Old enough to know how stuff works under-the-hood, young enough to be force fed confusing abstractions while in school.
Quote:
For some reason, it was decided to obfuscate programming, no doubt by geeks, for geeks.

I would say academics and/or not-technically-minded business people.. not geeks.
Quote:
Mathematicians are just as bad. If a simple explanation will suffice for undergraduates, they will insist on presenting bafflegab that would only appeal to the most dedicated of mathematicians.

I couldn't agree more

Quote:
He would not give a physics lecture unless he could explain a concept in words. Most profs would be lost doing that.

As a teacher myself (in my free time), I too try to put things into plain English as much as possible, and also show how it's working at the lowest possible level, with a goal-oriented focus. It's not easy, and it requires the students to pay much more attention as opposed to being taught the high-level abstractions. But overall, most students seem to enjoy the detailed approach because they find they actually understand the material better.

I once had a student of mine say to me, "if I think of a function as an object then I understand it better". I had no idea what to say, except for, "well if that works for you, that's good".

Quote:
In programming, I think it's very important for the beginner to understand what is being accomplished rather than filling his head with abstracted concepts.

I agree 100%

Quote:
I am in no way trying to present myself as an expert. You know far more about it than I do. However, you can type in STRUCT in a C++ program and the compiler will know what you mean. Is that true for CLASS?

No problem, I'm far from a C++ expert myself.
I'm not sure I understand what you mean by "the compiler will know what you mean". The syntax/semantics for a struct and a class are both well-defined.

evaluator
July 5th, 2009, 01:41
back to router : )
can "Snatch" put after router some capture device, which will grab all in/out?

wtbw
July 5th, 2009, 03:32
Quote:
[Originally Posted by WaxfordSqueers;81569]I am in no way trying to present myself as an expert. You know far more about it than I do. However, you can type in STRUCT in a C++ program and the compiler will know what you mean. Is that true for CLASS?


The only difference between struct and class in C++ is that struct defaults to public and class defaults to private.

BanMe
July 5th, 2009, 11:13
untrue structs and class's have a few more difference's. for instance class's that uses the new or delete keywords in the class also import the CRT or CLR or w/e the fuck its called now..
this is the reason I chose to use a namespace instead of a class in my current project.

regards BanMe

wtbw
July 5th, 2009, 11:17
Quote:
[Originally Posted by BanMe;81580]untrue structs and class's have a few more difference's. for instance class's that uses the new or delete keywords in the class also import the CRT or CLR or w/e the fuck its called now..
this is the reason I chose to use a namespace instead of a class in my current project.


I'm sorry, I think you're wrong... why would classes need code for new/delete if classes (Edit: structs. D'oh!) don't?

BanMe
July 5th, 2009, 11:19
well you try removing the CRT completly while still using a class and get back to me..
and maybe reformulate your question a little

regards BanMe

wtbw
July 5th, 2009, 11:39
Works for me using VS2008...

Code:

#include "windows.h"

class Test {
int m_iTest;

public:
Test() : m_iTest(0)
{}

Test(int i) : m_iTest(i)
{}


void SetTest(int i){
m_iTest = i;
}

int GetTest(){
return m_iTest;
}
};

int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow
)
{
Test test1(123), test2;

int a = test1.GetTest();
test2.SetTest(a);
int b = test2.GetTest();

return 0;
}


Using new or delete with either structs or classes requires the CRT, of course...

Edit: The default ones, that is... if you define your own, that works fine too.

Inside "class Test":
Code:

void* operator new(size_t size){
return LocalAlloc(LMEM_FIXED|LMEM_ZEROINIT, size);
}
void operator delete(void *pObject){
LocalFree(pObject);
}


and in WinMain:
Code:

Test *pTest3 = new Test(b);
pTest3->GetTest();
delete pTest3;


Sorry, kinda hijacked the thread there

BanMe
July 5th, 2009, 13:50
excellent...you proved my point and came up with a secondary solution.. to cover your ass..

That is quite commendable.

regards BanMe

wtbw
July 5th, 2009, 13:58
Your point was that there were differences between struct and class beyond private/public... I don't see me proving that If I'm misunderstanding you and there really is some subtle VC weirdness please give some more detail (and additionally I showed that using new/delete is quite possible without importing the CRT)

BanMe
July 5th, 2009, 16:52
yes by overriding it,
this will still have the also overide the destructor but it really isnt a class because you are managing the memory for it and it loses alot of its usebility. :0 although i think this is a viable solution I do not like the stickyness of overriding operators as it can lead to unforseen circumstances..

Maximus
July 5th, 2009, 18:18
Actually, structs and classes are identical, but the private/public part, as wtbw said. Historically speaking, the original c++ compiler was nothing more than a layer over a C compiler and it is hard to even imagine something like a 'class' not implemented with structures.

The new 'keyword' is global is can be changed across the whole context -not just inside the class: different platform might employ different memory management ways. tbw is perfectly legal in his overload action, and you are cheating a bit by claiming a compiler's dependant behaviour ("removing the Windows runtime of MSVC" in favour of your argument.

Also, structs can be mixed in multiple hierarchy, and be used exactly in every place a class is used -thing that you can verify swapping out 'class' with 'struct' in any evil piece of code your compiler can compile right. Your one is a misconception that is common among many, many c++ programmers. I know that stuct 'should' be different from class, but in truth it is not.

edit---
I did forget, if you use a 'real' c++ compiler, not the 'all-the-time' microsoft shit (hell, only "no comment and blame" over c++ MSC developer since the start of nineties), i.e. the slow borland C++, it works without standard headers (but windowsh) included in the code and without new/delete override. Of course this happens, and if it happens not in MS compiler, then it is 'M$ dependant shit': not ANSI dependant one.
The borland C++ correctly attaches the 'new' operator to its code, which uses windows API to do the work. Without anything more needed in code, of course.
edit 2---
wtbw made a slight error in his argumentation I did not notice from a fast reading: he had to overload the global version of new/delete, but that's minimal anyway.

Maximus
July 5th, 2009, 19:33
Quote:
[Originally Posted by WaxfordSqueers;81516]If there were readily identifiable holes in router security, and nothing was done to patch them, then that's a stupidity factor, not a security issue.

Actually, the policy of many (not all) companies is to spend as less as possible for security -the risk of a problem is often limited. Check out the OEM vs Ubisoft, where OEM (OEM!!) did enforce NO real security policy. Why? Because the got so unlucky that a guy discovered that one of the IP... But they mastered thousands of game/music and so on without enforcing any costly security policy.
And this is much worse in Europe, at least for what I have seen.

Quote:

how useless that crap [AVs] is and what a burden it is on your system.

Absolutely right. I have one for principle, and I keep it off most of the time, or it won't even let me compile, sometime Anyway, I keep the fastest I were able to find, because one never knows...

Quote:

Although you claim the firmware in a router is complex, it doesn't have to be that way. The hardware is fairly simple as digital hardware goes. The complexity comes in the different layers of transmission protocol, no doubt created by the abstract thinkers I mentioned earlier.

well, most of the routers are small computer with a RISC processor and some Mb of RAM. They use a reduced OS that allows the firmware creators to develop over a 'stable' kernel system, i.e. a linux 2.6.x kernel.
THe router not only manage the packet transit, but has a whole webserver built in for user's interaction (the router's management page is in a webserver inside the router), a firewall application etc. etc.

Quote:

When systems are designed based on abstraction, with little consideration given to hardware, no one really knows what's going on at a base level.

Yes, but problem is: training people in such fields is very costly, and it gives no immediate results from an operative standpoint. If you were in the management, would you train 50 developers for 6-12 months, or hire 1-2 'experts' that run premade vulno sacanner on your software/network and say you care of security by having a security team, internal auditing etc. ? ...or even better, claim you have the best security of all, and fix problems as they arise and saving even more money?
Sad question, I know

(sorry for double posting, but were 2 pretty different 'threads'...)