Thoughts

Catching a code injection hacker in the act

Several days ago, I installed the Redirection plugin from Urban Giraffe. It’s truly awesome, in more ways than one. John Godley, you are an amazing programmer! As I re-arranged the categories on my blog, I tracked the 404 errors through the plugin. On Saturday morning, I noticed the following bit of information in my log:

You can click on the thumbnail to view the screenshot at full size. Look at the entries for IP address 65.90.251.169. Notice something peculiar? That’s a hacker trying to inject malicious code into my pages. He was trying to call to code contained in a text file by the name ide.txt located on a possibly compromised domain.

First, I checked out his domain, new-fields.com. It looked legitimate. The text file was another story altogether. Have a look at the screenshots above. I also saved the code to my computer in case it ends up disappearing from the hacker’s website.

I tested the code, and it looks like some pages from the podPress plugin are targeted or affected — at least that’s what the error message given by WP referenced when I ran the code. I had that plugin enabled at the time, and I’ve disabled it since. It seems that the code tries to modify one of the header.php pages, along with checking disk space (?). So I thought, let me find out who this hacker is. Apparently, he’s from Napperville, IL, US, or at least that’s where his IP address lives.

What’s more, I thought it’d be interesting to see who owns that domain name where his text file resides. It turns out to be one Samir Farajallah from Dubai.

So what we’ve got so far is some dude in Dubai who owns the domain where the malicious code resides, and some hacker in Napperville, IL, trying to exploit my blog using that malicious code.

Wait, it gets better… On Saturday evening, I have another look at my blog’s 404 log, and I find that some other hacker from Vietnam (IP address: 203.171.31.19) is trying to hack into my blog using that exact same code, but this time the text file’s located on some domain in Argentina. That last link leads directly to the text file with the malicious code, but it’s harmless if you browse it. It only works if you run it as PHP code, like these hackers are trying to do.

So far, it looks like I’ve got two hackers, who may or may not be working together, using the same malicious code, located on two different, possibly compromised domains, and trying to modify my header files, possibly to insert code in there that will display splog content or some other stuff.

Update: It looks like three more hackers are trying their luck today, on Sunday morning, 9/30/07. Their IP addresses are 65.98.14.194, 66.79.165.19 and 66.11.231.48.

What I can tell you is that they haven’t been successful. I checked all of my files, and none of them have been touched. Everything’s fine. At this point, I’m not going to waste any more of my time trying to hunt them down. If I see that the attacks continue, I’ll notify my web hosting provider, along with the hosting providers of the other domains, and I’ll also notify the ISPs who own the IP addresses used in the attacks.

My thanks go out to John Godley for the wonderful Redirection plugin. I wouldn’t have been able to catch these hackers without it. I don’t often check my 404 log files, although I should.

I’ve been working in IT for 13 years or so. Maybe I’m naive, maybe I’m too honest for my own good, but I’ve stayed away from this hacking business, and I’ll continue to do so. It’s just not a sustainable lifestyle. I believe that the bad stuff you do in life will catch up with you sooner or later. It’s inevitable. These hackers will get what’s coming to them, and I won’t even have to lift a finger beyond what I’ve done so far.

Standard
Thoughts

The winner of the "Object-Oriented PHP" book drawing

Trevor Carpenter… is Trevor Carpenter! I announced the drawing on Tuesday, 9/25, and the deadline was the evening of Friday, 9/24. I’m going to mail the book to Trevor shortly.

Trevor has a few websites, and they’re all worth mentioning. First we have his personal site/blog, then his photoblog, called CamarilloWalk, his professional photography site, called Scribe Photography, and finally, Photowalking, a site dedicated to photowalks. Anyone interested in organizing such events can request an author account on the site and write about them there. The goal is to turn the site into the main place to check for group photowalking events in one’s local area. Pretty cool!

Standard
Thoughts

A lesson in civics and citizenship

I happened to look up resources on the Internet that help people prepare for the citizenship test. If you’ll remember, I announced last year that the citizenship test would get harder. I was amazed to see how many sites out there charge for access to information that’s already available freely, right on the USCIS website. They’ve got a great section that shouldn’t be missed by anyone studying for the citizenship test, called Civics and Citizenship Study Materials. It’s got a lot of downloadable PDFs stuffed full of valuable information, made available to anyone, for FREE. And here’s another web page with useful citizenship-related links.

I thought I’d offer you some sample civics questions that could get asked on the citizenship test. You may not be studying to be a citizen because you earned that privilege as your birthright, but it wouldn’t hurt anyone to know the answers to these questions. In spite of what the government tells you, there’s one kind of terrorism that runs rampant, right here among us. It’s called ignorance. I’m not implying that you, my reader, are ignorant, but we’ve all seen plenty of those people, right? Some of them don’t even know basic facts like who was our first president…

Let’s all do our part to fight ignorance. It costs nothing, and nobody dies in the process. How’s that for good odds? 🙂

  1. What are the colors of our flag?
    Red, white, and blue
  2. What do the stars on the flag mean?
    One for each state
  3. How many stars are there on our flag?
    50
  4. What color are the stars on our flag?
    White
  5. How many stripes are there on our flag?
    13
  6. What do the stripes on the flag represent?
    The first 13 states
  7. What colors are the stripes on the flag?
    Red and white
  8. How many states are there in the Union (the United States)?
    50
  9. What do we celebrate on the 4th of July?
    Independence Day
  10. Independence Day celebrates independence from whom?
    Great Britain
  11. What country did we fight during the Revolutionary War?
    Great Britain
  12. Who was the first president of the United States?
    George Washington
  13. Who is the President of the United States today?
    Barrack Obama*
  14. Who is the Vice President of the United States today?
    Joe Biden*
  15. Who elects the President of the United States?
    The Electoral College
  16. Who becomes President if the President dies?
    The Vice President
  17. What is the Constitution?
    The supreme law of the land
  18. What do we call changes to the Constitution?
    Amendments
  19. How many changes, or amendments, are there to theConstitution?
    27*
  20. What are the three branches of our government?
    Executive, Judicial, and Legislative
  21. What is the legislative branch of our Government?
    Congress
  22. Who makes the Federal laws in the United States?
    Congress
  23. Who elects Congress?
    The citizens of the United States
  24. How many Senators are there in Congress?
    There are 100 Senators in Congress, two from each state.
  25. For how long do we elect each Senator?
    Six years
  26. What makes up Congress?
    The Senate and the House of Representatives
  27. Name two Senators from your state.
    The answer to this question depends on where you live.
  28. How many voting members are in the House of Representatives?
    435
  29. For how long do we elect each member of the House of Representatives?
    Two years
  30. Who is the head of the Executive Branch of the U.S. Government?
    The President
  31. For how long is the President elected?
    Four years
  32. What is the highest part of the Judiciary Branch of our Government?
    The Supreme Court
  33. What are the duties of the Supreme Court?
    To interpret and explain the laws
  34. What is the supreme law of the United States?
    The Constitution
  35. What is the Bill of Rights?
    The first ten amendments to the Constitution
  36. What is the capital of the state you live in?
    The answer to this question depends on the state where you live.
  37. Who is the current Governor of the state you live in?
    The answer to this question depends on where you live.
  38. Who becomes President if both the President and Vice President die?
    The Speaker of the House
  39. Who is Chief Justice of the Supreme Court?
    John G. Roberts, Jr.*
  40. What were the original 13 states?
    Virginia, Massachusetts, Maryland, Rhode Island, Connecticut, New Hampshire, North Carolina, South Carolina, New York, New Jersey, Pennsylvania, Delaware, and Georgia
  41. Who said, “Give me liberty or give me death”?
    Patrick Henry
  42. Name some countries that were our enemies during World War II.
    Germany, Italy, and Japan
  43. What was the 49th state added to our Union (the United States)?
    Alaska
  44. How many full terms can a President serve?
    Two
  45. Who was Martin Luther King, Jr.?
    A civil rights leader
  46. What are some of the requirements to be eligible to become President?
    A candidate for President must:

    • be a native-born, not naturalized, citizen,
    • be at least 35 years old, and
    • have lived in the U.S. for at least 14 years.
  47. Why are there 100 Senators in the United States Senate?
    Each state elects two Senators.
  48. Who nominates judges for the Supreme Court?
    The President
  49. How many Supreme Court Justices are there?
    Nine
  50. Why did the Pilgrims come to America?
    To gain religious freedom
  51. What is the executive of a state government called?
    The Governor
  52. What is the head executive of a city government called?
    The Mayor
  53. What holiday was celebrated for the first time by American colonists?
    Thanksgiving
  54. Who was the main writer of the Declaration of Independence?
    Thomas Jefferson
  55. When was the Declaration of Independence adopted?
    July 4, 1776
  56. What are some of the basic beliefs of the Declaration of Independence?
    That all men are created equal and have the right to life, liberty, and the pursuit of happiness
  57. What is the national anthem of the United States?
    The Star-Spangled Banner
  58. Who wrote The Star-Spangled Banner?
    Francis Scott Key
  59. What is the minimum voting age in the United States?
    18
  60. Who signs bills into law?
    The President
  61. What is the highest court in the United States?
    The Supreme Court
  62. Who was President during the Civil War?
    Abraham Lincoln
  63. What did the Emancipation Proclamation do?
    The Emancipation Proclamation freed the slaves.
  64. What special group advises the President?
    The Cabinet
  65. Which President is called the “Father of our Country”?
    George Washington
  66. Which President was the first Commander-in-Chief of the U.S.Army and Navy?
    George Washington
  67. What was the 50th state to be added to our Union (the United States)?
    Hawaii
  68. Who helped the Pilgrims in America?
    The American Indians/Native Americans
  69. What is the name of the ship that brought the Pilgrims to America?
    The Mayflower
  70. What were the 13 original states of the United States called before they were states?
    Colonies
  71. What group has the power to declare war?
    Congress
  72. Name the amendments that guarantee or address voting rights.
    15th, 19th, 24th and 26th
  73. In what year was the Constitution written?
    1787
  74. What are the first 10 amendments to the Constitution called?
    The Bill of Rights
  75. Whose rights are guaranteed by the Constitution and the Bill of Rights?
    All people living in the United States
  76. What is the introduction to the Constitution called?
    The Preamble
  77. Who meets in the U.S. Capitol building?
    Congress
  78. What is the name of the President’s official home?
    The White House
  79. Where is the White House located?
    Washington, DC
  80. Name one right or freedom guaranteed by the first amendment.
    The rights of freedom of religion, of speech, of the press, of assembly, and to petition the Government
  81. Who is Commander-in-Chief of the United States military?
    The President
  82. In what month do we vote for the President?
    November
  83. In what month is the new President inaugurated?
    January
  84. How many times may a Senator or Congressman be re-elected?
    There is no limit.
  85. What are the two major political parties in the United States today?
    The Democratic and Republican parties
  86. What is the executive branch of our government?
    The President, the Cabinet, and departments under the cabinet members
  87. Where does freedom of speech come from?
    The Bill of Rights
  88. What U.S. Citizenship and Immigration Services form is used to apply for naturalized citizenship?
    Form N-400 (Application for Naturalization)
  89. What kind of government does the United States have?
    A Republic
  90. Name one of the purposes of the United Nations.
    For countries to discuss and try to resolve world problems or to provide economic aid to many countries
  91. Name one benefit of being a citizen of the United States.
    To obtain Federal government jobs, to travel with a U.S. passport, or to petition for close relatives to come to the United States to live
  92. Can the Constitution be changed?
    Yes
  93. What is the most important right granted to United States citizens?
    The right to vote
  94. What is the White House?
    The President’s official home
  95. What is the United States Capitol?
    The place where Congress meets
  96. How many branches are there in the United States government?
    Three

*Answer will change with time.

Standard
Thoughts

Book giveaway: Object-Oriented PHP, by Peter Lavin

Remember my last book giveaway? I meant to get around to this second one a little sooner, but life intervened. This time, I’m giving away “Object-Oriented PHP“, by Peter Lavin. I reviewed this book back on August 30, 2006. It’s been sitting in my library since then. It’s still relevant, but more importantly, it’s still unused. Retail cost for the book is $29.95.

Would you like to get it for free?

The rules

This time, I’m keeping things even simpler. To make sure there’s no confusion, here are my goals:

  • Increase my readership, ideally the number of people subscribed to my feed.
  • Give away these books. They’re just sitting on the shelf gathering dust right now, and that’s not what books are for.

What I want you to do to qualify is to tell two of your friends or contacts about my blog. Send them an email to let them know about it, and invite them to subscribe to my RSS feed. Then leave a comment on this post to let me know you did it. That’s it. I’ll use the honor system and trust you.

Late Friday afternoon, I’ll gather the names and pick one at random, then notify the winner by email. The winner will need to pay for the book to be shipped to his/her address. That’s all they’ll pay for, nothing else. The money can be sent via PayPal. If the winner has a website/blog, I’ll also link to it in an announcement on my blog.

Standard
Thoughts

How I handle contacts at Flickr

When you add me as a contact on Flickr, you may notice that I may not add you back. Please don’t think I’m ignoring you. It’s just that I handle contacts differently at Flickr.

I like to go through all of my contacts’ photographs. I try to view every photo they’re posting. I know that’s a rarity, but I consider it my responsibility. I’m not going to be a false contact that jumps on someone’s photo stream once in a while and comments on a couple of photos, then you don’t hear from them again for 6-12 months, if ever.

Since my time is limited, and I do try to go through every photo that my contacts post, I can only have a limited number of contacts. I’ve found out that I can handle about 100 or so contacts.

I also look for photographs that inspire me. I look for a high concentration of artistic or creative photographs in someone’s photo stream.

I also encourage my contacts to do the same with me. If you’re not inspired by my photos, take me off your contact list. There’s no reason for you to be frustrated with the photos I post. Life’s too short to be frustrated with things you can change.

Does that mean I forget about the people who’ve added me as a contact? No. I go through my Recent Activity regularly, and when I see that people who aren’t on my contact list have taken the time to interact with my photos, I return the favor.

I hope this explains my stance, and I also hope that those of you who’ve added me as a contact don’t feel offended. Feel free to contact me at any time through whatever means I’ve provided to you (phone, email, blog).

If you’d like to get to know me, a good place to start would be this blog, which is where I spend most of my time. Read my work, comment on it, start a dialogue, etc. Life is one big et caetera. It’s not limited to a contact list on one social networking site.

Standard