I believe even with a no-execute /tmp partition you can still execute with this:
I'm going to have to concede that without even trying it. It's simply a text file that gets fed to an interpreter so it isn't executing. The only thing no execute would stop would be an executable.
Experiences with Maldet and ClamScan:
- Linux Malware Detect (LMD) is a great concept. Their page states that instead of being focused on PC viruses, it's focused on web page exploits, and makes its signatures based on exploits discovered by edge routers, as well as conventional sources. That's perfect! Maildet and it's signatures are designed to find these types of threats. It uses its own scan engine, unless the more efficient ClamAV engine is available, which in my case it is.
- To test I placed pages out there with known exploits and ran maldet. I watched the progress from the event log as recommended. it found newer signatures available, downloaded them, updated them, found ClamAV, and scanned the files. It didn't find any of them. A couple days later, I still couldn't believe it, that there had to be something wrong, so I checked everything over again and repeated the test. Same thing. It didn't find the files. If you look at them with a text editor, they are plain as day, and Google and Bing had no problem finding them. I sent them the malware in their submission area, and never received a response.
- Before I found LMD, I ran across a post where I guy was using some scripts with ClamAV. One of the ClamAV scripts runs clamscan at night and does the entire server, and the other every hour, and only checks the structures I tell it to, and only files that have been modified within the last hour. I modified these scripts to work with FreeBSD and cleaned them up. When I ran the daily one, it found every web malware file I put out there, plus showed me that I had 667 more viruses in e-mail files in e-mail accounts that were connected directly to web site forms on the server, and no viruses in the mailboxes where the traffic comes in through conventional e-mail, alerting me to something else that I didn't know was going on.
Summary: This is not at all how I expected this to play out. Initially, as you can tell by my earlier posts, I was pretty pumped about LMD based on its focus on catching compromised web pages. Afterward I was thinking about running both. Now I'm starting to think that running LMD may just be an "exercise". My post on the LMD forum about what happened was never posted. The newest post is a glowing one from 3 months ago. My submission with examples of what was not caught still comes back 3 days with SMTP delivery errors. (They are encrypted in an attachement with the password in the e-mail.) I think I'll just use my scripts that use clamscan. It found an iframe + javascript exploit on one site that had been around since 2007.