What to do?

In the last post (Internet Threats) I covered some real threats at a high level. Now lets talk about what you can do to reduce the threat.

Internet Browsing
Regardless of the browser you use, IE, Chrome, Safari, or something else, you should NEVER use the browser’s “remember my password” feature or save any personally identifiable information you enter on a form. I know it is a great feature, you never have to remember your password because the browser remembers them for you. The big problem is that anyone with access to your computer has access to those same passwords.

To reduce the risk of exposure to malicious files or programs, Set your web browser to block pop-ups. You can always create an exception for some sites on a case-by-case basis. This will not only make your browsing more secure, but it will make your experience more pleasant.

If you play online games or download free software, be very careful. Spyware may be bundled with those programs. When you install the program, you may be installing something much more dangerous than you bargained for.

Be aware of the web browser address bar. That tells you what site you are on. If the address changes unexpectedly (like from Bank of America to Hacker’s Bank of Russia) or if you click on a link and are taken to an unfamiliar address, watch out!

Many ads track you or may even contain malware. Install an Ad Blocker browser extension (AdBlock) to block malicious ads. If you want, you can add additional tracking and malware filter lists to increase your protection.

Avoid clicking on links in general. Ads, offers, articles, etc. These are all potentially dangerous. Instead, note the information from the ad or article and use Google to search and see if it is something that you really want to see. On the other hand, if you’re on a mainstream site (CNN for example) you can trust links for news or similar links. But be cautious on ads and offers that send you to a third-party website.

Email
This is a tough one, I know. We all get those juicy and tempting messages in our email inboxes. You have to be strong and delete the messages that come from someone you didn’t expect. Whatever you do, NEVER click on a link in an unexpected email. Just clicking on the link can have you installing malware or spyware on your computer. Email is emotionally inviting for many, but it is a dangerous and high-risk tool that hackers love.

Even if you get an email from someone you know, think twice before opening any attachments. Email is so easy to spoof. (‘Spoofing’ is sending an email that looks like it is coming from someone you know). If you’re expecting the attachment, fine. But if it’s unexpected… think twice… then think again.

AntiVirus Software
This is part of the cost of owning a computer. You MUST use anti-virus software if you’re using your internet browser. Sure, that software costs money, but the risks you accept without it may be far beyond what you think. Think of what kind of transactions you make on that computer. Web banking, shopping? How many times have you input a credit card number? How many login accounts do you have? Consider the risk.

Passwords
Here is another tough topic. Passwords. I strongly recommend a password manager application. I use 1Password, one of the top-rated applications in this category. Rather than allowing the browser to remember your passwords, the password manager remembers them. Better still, it will generate secure passwords and remember them for you. What do you think is a better password – fluffy1973 or ?M7hUBhJkRQX4nDczX4p?

1Password encrypts the password before storing them and works across pc, phones, and tablets. You just have to remember one master password. Make it complex by basing in on a phrase – ‘My grandparents came to America in 1889! They came from France’ becomes MgctAi1889! TcfF. Remembering the phrase is easier than remembering the password.

One last word on password security. If you have an iPhone, you can leverage the built-in password manager as long as you require fingerprint security to access passwords.

Internet Threats

Have you ever had your Facebook page hijacked? Ever gotten replies or bounced messages for an email you know you never sent? What about losing access to your email because someone changed the password without you knowing?

The last thing most of us want to think about is the risks we face when browsing the Internet. I sometimes find myself looking at those ads that pop up on sites as I look for interesting ‘news articles’. Then I remember the many cases where friends or family experienced Internet calamities like those above, or worse. What I hope to do here is want to do is cover some real threats, how they work, and what you can and should do to protect yourself.

The Weakest Link

We’re curious and we’re gullible. When I was still working, we tested system and personal vulnerabilities. I was always amazed at the number of people that fell for the faked email sent to test personal susceptibility. People were always opening or responding to phishing emails or emails with “malware” attachments. So, let’s talk about those malware-laden emails.

You get an email with a picture or video attachment and some catchy message that entices you to open and look at the attachment. Unfortunately, that promised video of a cat doing gymnastics also had some computer code or HTML along with it. When you clicked and opened the image, you also activated the code.

Impact

The code was somewhat harmless itself because it just opened a background connection to a website someplace. But then it downloaded a larger and more malicious program onto your computer that installed itself on your PC or Mac. As a result, your security was compromised. Let me tell you about a real case of this that happened to someone in my extended family.

One day they could not get into their web banking account. We tried resetting the password online with no success. Frustrated, we called the bank customer service to reset it over the phone. Guess what – the account was locked down.

Not a creature was string…

Malware was installed on the computer at some point in time. Maybe it happened when browsing a ‘fashion’ website, or maybe it was a click on that kitten email. Regardless of how it happened, the computer had malware. Then early one morning, while everyone was sleeping, a ‘bad guy’ used the malware to connect up to that computer. They opened the browser and connected to web banking. To make life easy, the friendly computer had the login/passwords auto-populate, and poof, the ‘bad guys’ were in the bank account!

Fortunately, the bank’s security systems detected some anomalies in the session. Those security tools shut down the connection and disabled the account. It could have been worse, a lot worse.

Bad Actors and Dangerous Stuff

‘Bad Guys’ have been taking advantage of COVID-19 to target us with malware. These guys send emails disguised as legitimate messages about COVID-19. You’re told to ‘click a link below to learn more…‘. However, the link ends up installing malware that copies the files on your device and steals your personal information.

Right about now you may be asking yourself, what can you do in the face of all these threats? Or maybe you just want to throw your hands up and surrender. My advice is to relax. Most of us adapted to COVID-19 with more hand washing and masks. You should use similar precautions to protect yourself from these Internet viruses… a little behavior change.

What to Do?

First – don’t panic. Second, check out my recommendation in the What to do? post.

Covid-19 – Grandpa’s Science

Pandemics, viruses, quarantines, and vaccines have become part of everyday conservations for many. However, it was only after having discussions with our grandkids about being out of school because of COVID-19 that I realize that these same terms had become embedded in their vocabulary as well.
covid19
Because of their interests, I made a series of really simple YouTube videos to explain the COVID-19 infection and vaccines. If you’re interested, the first is entitled Corona Virus School and can be found on my YouTube channel.

I covered the virus itself and how our bodies respond with T-cells and antibodies. Granted, the composition and technical accuracy may rate somewhat low, but it got the point across to our grandkids. As a result, they asked for more information.

The second video, Part 2 – Covid 19 Review is a short review of virus infections that I sent them a week or so later. I figured they needed a refresher before sharing the vaccine information. This episode covers a lot of the same material, but quickly and at a high level.

The most recent video is on the Covid vaccine – Covid-19 Vaccine. I’ve tried to provide a very, very brief and high level overview of how the vaccines protect us and why they are important. How to you explain complex topics to small children? I tried Legos.

We don’t want our grandkids to shy away from the complexities of science. It’s important to us that they have an understanding of something so impactful as COVID-19, but we don’t want them to be afraid of it. Hopefully, the Legos help.

Without a doubt, our grandkids are not very critical of the science I’ve applied to explain viruses and vaccines. There’s no doubt that Dr. Fauci would have some criticism of how I’ve explained the science, but, hey! My target is a couple of young grandchildren!

Let me know what you think. Just remember, our grandkids loved them, so don’t be too hard on me!

Technology… huh?

Six words I’ve heard a lot these past several days are “No Grandpa, let me show you.” And here I thought that as Baby Boomers we knew more than a four-year-old.

Unspecting Baby Boomers

Julie and I are watching our ‘almost two’ and ‘almost five’-year-old grandkids while their parents take a well-earned vacation. Amongst the walks, playgrounds and library visits, “The Sound of Music” is available “on the blue ray player”. (I never had a blue ray player) Naive me was thinking that a ‘blue ray’ was like a VCR… no problem I told myself.

What the heck is a PS4?

It turns out that the ‘blue ray’ is actually a PS4 machine – a play station four. Whoever invented this darn contraption must have intended it as a torture device for Baby Boomers. First off, there are only two buttons on the box itself. I stared at it in disbelief until one of the grandkids uttered a version of that annoying phrase… “I got it, Grandpa” and magically, the box came to life. Now, how to start it playing the movie…

As I sat there staring at the PS-box, muttering to myself and pushing the non-power button I hear another version of – “That’s not what you do. Here, Grandpa, let me show you…”. With that, the almost-five-year-old picks up something that looks like a cross between a palm sander and a flight control for a spaceship and tells me to “just use the menu’. Like the box, this thing has no labels, just a bunch of ridiculous symbols. Some of the buttons have no labels at all. Another Baby Boomer torture device.

How does she do that?

In seconds, this ‘almost five-year-old’ flew through menus and has skipped ahead to the part that she wanted to watch. When I asked her how she knew to press ‘those buttons’, she gives me a confused look and says, “That’s just what you do, Grandpa.” Defensively, I tell her that I understand technology, but I’ve never used a PS-thing before. In what I swear sounded like a patronizing tone she tells me, “I know. It’s okay, Grandpa”. “No,” I say with a more defensive tone, “I worked with computers for over thirty years… I even wrote database interfaces in C…”. She patted me on the knee and asked if we could just watch the movie now.

I really do understand technology… really. I retired because I could, not because I got too old for the technology. Really.

PlatformIO for Arduino on Linux Command Line

So I had a challenge that required me to keep running up and downstairs as I was troubleshooting a new project. I’m having a problem with a temperamental water heater and decided to monitor it remotely. I have a photo-resistor taped to the water heater’s status LED and I use an Arduino Nano to capture and time the LED flashes and gaps. Then I send the results out the Nano’s USB interface to a Linux server I have running in the basement, conveniently close to the water heater.

Not having a laptop, I was using minicom to watch the USB traffic remotely from my desktop on the main floor of the house. Based on my observations of the USB traffic and minimal documentation on the Honeywell WV4460 temperature control, I’d come up with a programming change, take the stairs to the basement, disconnect the USB, pull the Nano and trek back upstairs to reprogram and flash it. While this started to become a chore, things got a little better as I employed a second Nano I had laying around. Now I’d reprogram the second board and just swap them. I still had to run up and down the stairs, but other than the device port changing every time I swapped out a board, it was a bit easier.

About the 10th trip back downstairs I had a thought. (First I thought – how many times is this gonna take to get it right…) My next thought was recalling that a while back I installed PlatformIO and Atom on my windows machine just to take it for a spin programming ESP8266 boards. Since it’s supposed to work with Arduinos and run on Linux so I wondered if it had a CLI. (My Linux server is CLI only with no GUI). Sure enough, it did and since I already have pip installed –
Sudo pip install -U platformio

The directory layout under Linux is the same as on Windows so I created an Arduino workspace named wheat_v3 (for WaterHEATer version 3) and initialized it.
cd ./wheat_v3
platformip init
platformio init --board=nanoatmega328

I then created a main.cpp in the src directory and did a quick copy/past of the Arduino native code, made some minor changes and saved it. Then from the ./wheat_v3 directory this is what my edited platformio.ini looks like:

[env:nanoatmega328]
platform = atmelavr
board = nanoatmega328
framework = arduino
upload_port = /dev/ttyUSB1

I ran platformio run –target upload a few times and cleaned up a few errors. Once the issues were cleaned up I got a clean compile and upload! Now each time I need to make a change to the code on the Nano I just kill the server side application to release the USB port and compile/upload. This is so fast and easy you’ll love it if you’re interfacing a micro-controller with Linux.

Raspberry PI GPIO

On Raspberry PI I use the WiringPi library for both C and Python development. Below is an example of cycling through three GPIO pins to light up a set of LEDs.

  • GPIO 17 – Pin 6 maps to the WiringPi logical pin 0
  • GPIO 22 – Pin 7 maps to the WiringPi logical pin 2
  • GPIO 27 – Pin 7 maps to the WiringPi logical pin 3
[code lang=”c”]#include <wiringPi.h> int main (void) { int offset; offset = 100; wiringPiSetup () ; pinMode(0, OUTPUT); pinMode(2, OUTPUT); pinMode(3, OUTPUT); for (;;) // Loop continously { digitalWrite (0, HIGH) ; delay(offset); // delay ‘offset’ miliseconds digitalWrite(0, LOW); // turn off 0 digitalWrite(2, HIGH); // turn on 2 delay(offset); digitalWrite(2, LOW); // turn off 2 digitalWrite(3, HIGH); // turn on 3 delay (offset); digitalWrite(3, LOW); // turn off 3 } // Loop back and start over return 0 ; }[/code]

Compile using gcc:

#gcc gpiox.c -o wp gcc wpiox.c -o wp -lwiringPi

The ‘-lwiringPi’ tells the gcc compiler to use the wiring Pi library. Then run using…
#./wp

And watch the LEDs flash…

Wireless RFM69HW – Part II

Gateway Node

The weekend is here and another chance to start poking around with my new RFM69HWs. Here’s my plan. I initially want to get the gateway node connected to a Raspberry PI in my basement via I2C. (I know, there’s probably an easier way, but, hey – I’m doing this for fun and to get better understanding of how I can leverage these boards.) The Pi should be able to poll the gateway periodically to get updated temperature data. I’ll figure out the logging later, by MySQL and a basic graph should give me a good view.

anarduinoConnecting the Anarduino Gateway (GW) to the Pi is pretty straight forward. The GW uses 3.3VDC which is available on Pin 1 of the Pi. The I2C pins on the Pi are close by as well on Pin 3 and 5 with a GND pin just down the way at Pin 9. You can see in the image on the right that the 3.3 VIN and GND pins are on the same side as the analog pins; that makes wiring easy.  In the following table I’ve laid out the pin mapping between the Anarduino and the Raspberry PI.

[table “T1” not found /]

The heart of the code for the gateway is very compact. Lines 7-9 initialize the board with the defined frequency, network and node ID. These are configured with #define statements. In this case the board is 433 mhz, the networkID is 100 and this node is set as 2.


#define NODEID 2 // GateWay - each node must be unique
#define NETWORKID 100 // Same on all nodes that talk to each other
#define FREQUENCY RF69_433MHZ

[ccN lang=”c”]
void setup() {
Serial.begin(9600);
delay(10);

// RFM69HW setup
Serial.println(“RFM69HW config and setup…”);
radio.initialize(FREQUENCY, NODEID, NETWORKID);
radio.setHighPower(); // only for RFM69HW!
radio.encrypt(null);
Serial.println(“RX at 433 Mhz”);

Serial.print(“GPIO and I2C config and setup…”);
Wire.begin(SLAVE_ADDRESS); // initialize i2c as slave

// define callbacks for i2c communication
Wire.onReceive(receiveData);
Wire.onRequest(sendData);
Serial.println(“\nReady.”);
}

void loop() {
char inData[10];

if (radio.receiveDone())
{
memset(inData, 0, 10);
Serial.print(“#[“);
Serial.print(radio.SENDERID, DEC);
Serial.print(“] “);
for (byte i = 0; i < radio.DATALEN; i++){
Serial.print((char)radio.DATA[i]);
inData[i] = (char)radio.DATA[i];
}
if(inData[0] == ‘T’)
strcpy(cT, inData);
if(inData[0] == ‘B’)
strcpy(cB, inData);

Serial.print(” [RX_RSSI:”);
Serial.print(radio.RSSI);
Serial.print(“]”);

if (radio.ACKRequested())
{
byte theNodeID = radio.SENDERID;
radio.sendACK();
Serial.print(” – ACK sent.”);
}
Serial.println();
}
}
[/cc]

Lines 30-37 handle data from the remote node. Temperature data is prefixed with ‘T’ and battery data with ‘B’. Both are stored and delivered to the Raspberry Pi on I2C request. Next let’s look at the remote node.

Remote (Sensor) Node

Last week I added an antenna to each of the boards. This week I’ll design and build the remote temperature sensor. I selected a SparkFun TMP102 sensor; it’s small, fast and easy to work with. Because the remote node will be running on battery, I also wanted to add the ability to monitor the current battery output so I can (1) know when I need to replace the batteries but also (2) so I can optimize the configuration of the board to maximize battery life.

RFM69HW Anarduino Mini with TMP102 Sensor
RFM69HW Anarduino Mini with TMP102 Sensor

The two resistors act as a voltage divider with the resulting voltage compared to the internal 1.1v reference. Other than that you can see the connections are pretty straight forward with the I2C SDA and SCL pins connected between the sensor and the Anarduino.

Power consumption proved to be an issue as the remote node was rapidly chewing through the battery. I found a library (LowPower.h) that looked pretty good and installed it. SO far I’m seeing good results. Here’s the headers for the node:

Setup if pretty sparse with the reference voltage set to INTERNAL – 1.1v and the RMF69HW is configured. Because I’m not overly concerned about the privacy of temperature data I’ve set encryption off, however it’s nice to have this feature available. The RFM69HW supports a high-power mode which I’m using.

Wireless RFM69HW – First Steps

anarduinoA week ago I got a set of HopeRF Anarduino Mini RFM69HW boards in the mail. These boards are similar to an Arduino Pro Mini but have a RFM69HW wireless module mounted on them. They’re reportedly 100% Arduino IDE compatible and run at 8Mhz. The 6-pin header interconnect is an unpopulated set of six IO interfaces for FTDI type USB to UART (or similar) module or cable. The board also supports all the GPIOs you’d find on a similar Arduino board plus two additional analog pins, A6 and A7. You can see on the image here the FTDI headers and the four GPIO pins I’ll be using.

First things first, I soldered a set of straight male pains on the two GPIO interfaces and a set of 90 degree pins on the FTDI interface. After downloading and installing the RFM69 libraries I was ready to go. Then I connected a SparkFun FTDI 3.3VDC Basic Board to the FTDI interface, plugged in a USB cable and and fired up the Arduino IDE. Worked like a charm.

On the 1.6.4 version of the Arduino IDE you have to select the board, the processor and COM port. Initially I tried the Arduino Mini with no luck. After poking around on the internet I found a recommendation for using an Arduino Pro Mini setting and that did the trick. Once the IDE recognized the board I was able to compile and upload a demo program and soon had the two devices talking across the wireless link. However, as is normally the case with me and new hardware, there was a small problem.

The RSSI was running in the -110db to -115db range; not great if you want any distance at all. As I moved them more than a few feet apart the signal was lost. Like I said, not a good situation. I tried different orientations but they provided only meager success. With more poking around on the Internet I came across information on installing an external antenna. I ended up cutting a section of 24 ga solid core copper wire to 6 and 13/16th inches and soldering it into the antenna connection pint on the board. Wow, did that do the trick! I’ll get some more detailed information on that later. The short version is that it worked.

RSSI climbed to -10db and I was able to move the client node outside the house with no issue. Even at a distance of ~40’ though multiple walls I’m seeing -45db. Next step is adding a TMP102 sensor and battery pack to the setup. More to come.