« Unexpected analogy | Main| Put your computer to good use, even when you're asleep »

Drop This.

Category domino
I often take for granted just how much Domino really does for us, all of the things that have to be manually constructed - or protected against - when developing in other platforms. But the more that I see stuff like this, the more thankful I become that I develop in Domino, and the more baffled I become that it is still so frequently dismissed as not being a "real" development platform. Obviously, various database formats are more appropriate for certain tasks than others, but consider for a moment that, when interacting with some of the "real" (i.e. relational) database platforms, a programmer has to specifically design the code to prevent users from accidentally or maliciously deleting an entire database. In my administrator days I saw quite a few people delete their mail database accidentally (back in R4, when you had to give the users Manager access for the Out of Office agent to correctly run on their behalf... in other words, 8 years ago, when Windows 98 was a new operating system and I was too young to drink). But I'd love to see someone try to delete a Domino database simply by entering malicious code into a field on a web form. Seriously: give it a try. Enter a comment on this post and see if you can delete my blog. It's not every day I intentionally invite comment spam, so cut loose. Have fun. My money's on Domino.

Comments

Gravatar Image1 - Shouldn't Oracle "exstall", ya know like "include" and "exclude"... uninstall and deinstall seem to be oxymorons.

Gravatar Image2 -
"Are you the Southern Oracle?"

"Yes. We are."

"Then you must know how to save Fantasia!"

"Yes. We do."

Gravatar Image3 - Not really responding to your immediate post but rather have a question. Sorry if I missed the obvious place to ask it. If one wanted to write an agent that would collect the contents of the notes/data folder into some sort of a list wouldn't that require access to the local file system? Even so do you have any routines to do that?

Gravatar Image4 - Now to your original comment. I must be awake now or getting a 2nd wind
Its true ..We in Domino land are really unique in terms of the "taken for granted things" that make our coding so much faster and easier than say the DBA environment. In my new gig I have the responsibility for overseeing Java development..really cool new stuff..but for an example after about 3 days or so I've finally set up a Tomcat 4.1.31 project in Eclipse 3.2 on XP O/S due to the Java framework being used (libraries, files, jars, etc) being too large to compile in the standard memory allotment..hello "-vmargs -Xmx1024m" in the target line of the eclipse startup shortcut..but I'm not complaining..its called on the job training This is a really cool thing cuz you can run/debug Tomcat from totally within Eclipse. Also just for the privilege of loading Oracle 10g database I slowed down my desktop processor by about half speed..had to eventually"deinstall" Oracle 10g..they don't say "uninstall"....while it was installed i had to figure out how to access the database even though i was given a username and password..turns out the missing link was I had to decide whether i was going to access as SYS, SYSMAN or SYSTEM..point being this was not volunteered info..why..probably part of the security..but I'm not complaining. Then additionally every so often the url access for the iSQLPlus (where you write your PL/SQL code) just doesn't work (system turns off the service every so often..probably another security feature Let me know id you ever want to configure eclipse to work with Tomcat..Later,

Gravatar Image5 - OK..now I'm really sorry..not only mess up your flow by asking a question in the wrong place, but after diggin a little found out that I also had the answer. So here goes anyway:
1. Yes it would require access to the local file system. just set the agent security options to either 2 ("Allow restricted operations") or 3 .
2. Here's a routine that I wrote to do the same. Place following in an agent and run it from the Notes client. It probably would work from the browser too..though I didn't check:
Sub Initialize
Dim fn List As String
Dim pathName As String, fileName As String
Dim ctr As Integer
pathName$ = "c:\lotus\notesr6\Data\*.*" 'your desired path here
fileName$ = Dir$(pathName$, 0) '0 returns normal files..16 returns directories..check the Notes Help for more options
Do While fileName$ <> ""
fn(ctr) = fileName$
fileName$ = Dir$()
ctr = ctr + 1
Loop
End Sub

Gravatar Image6 - Sounds like you're having all kinds of adventures these days... sure beats coming up with some magical way to make the same URL point to six different web pages ("Yeah, see, the 'U' in 'URL' stands for 'universal'... so you can't actually do that." "We don't care. Do it anyway." "Oh. Okay, then.").

About the file system scanning, yep, the agent needs a little extra permission. Kinda like when the sherriff deputizes you because the zombies already ate everyone else. Um... yeah, long story. Let's just say there's a very good reason I left California. Just kidding. Zombies aren't real. Yet. Anyway, yes, that would work from a browser too... except it'd be reading the server's data folder, of course. Hope that's your intent (to read the client's file system from a browser I think you'd need an applet). You can even tell a server agent to do a Dir$ on a network folder; if the server is a Windows box, you can set Domino to run as a service (really should anyway), but instead of running it as LocalSystem, set it to log on as a Windows account that has at least read permissions to whatever location you'll be scanning. By the way, if all you need to scan is the data folder, I'd suggest using NotesSession.GetEnvironmentString("Directory", True) to obtain the folder location: that way you don't have to hardcode the path. Never can tell where that puppy will be on any given machine.

Gravatar Image7 - You cannot write anything more dangerous in web input fields than javascript - but I hope everybody replaces < > and [ ] in fields on web forms. So, the only thing that comes to my mind to alter the security of Domino Database from web is trying to change authors or readers fields.

Let's take a look at a situation where a user has rights to edit a document from web (through means of authors field). Even if authors field is hidden on the web, you can can copy Domino generated source code, modify it so that you add the authors field (e.g. <input name="AuthorsFieldName">), put * in it and submit it back to Domino. Now everybody has author access to this document! This technique assumes you know or guess the name of authors field - may be as easy as 'Authors'. If form option Generate HTML for all fields is selected you can just read the name from the HTML source.

So, what can we do? First you should make all your authors and readers fields computed. Then be very careful how you construct WQS agents and @formulas - if you put the name of the authors field in a formula you're probably looking for trouble as this value can come from web.

Contact Me

Hire Me

Elsewhere

What the Quote?

"It's difficult to whistle with hair in your mouth."

Laura Hearron

"Yeah, fight the power... be an exponent opponent."

Tim Tripcony

"Put up your duchess."

Alex Belt

"Business value... IN MY PANTS."

Steven Rodgers

"Okay, now, see, that noise... that's not me."

Julian Robichaux

Apparel

Lotus Rocks

I write the code that makes the young girls cry

Current Terror Alert Level

Assorted Linkage

ClustrMap