WebApp secure access to protected files/programs


 
Thread Tools Search this Thread
Special Forums Cybersecurity WebApp secure access to protected files/programs
# 1  
Old 03-14-2011
WebApp secure access to protected files/programs

Hello,

I'm working on an embedded linux project that provides a devices that uses an IPSec VPN (using racoon) to connect back to base. The device also hosts a WebApp that allows admin users to change many aspect of the networking setup, including things like the VPN pre-shared-key, IP addresses and user passwords. This requires the WebApp to be able to access protected files such as /etc/network/interfaces, and racoons psk.txt as well as programs such as usermod.

My question is, what is the best and most secure method of accessing these protected files from the WebApp code?

The WebApp is running through lighttpd, and uses php for the server-side scripting. Currently, php code calls shell scripts (using exec() ) outside of the document-root that then access the files. The shell scripts are owned by the webapp user, and use sudo to access protected files and programs. This requires the webapp user to have permissions in the sudoers files for programs such as cp, cat, and usermod. All of which I believe make this a very insecure system. The only other choice I thought was to setuid the shell scripts.

What would be the normal method of accomplishing such things for a web application? Any advice on a secure method of doing this would be most appreciated.

Thanks very much
Rob
# 2  
Old 03-15-2011
Some sort of localhost listening service suggests itself to me, so there is only one actor modifying things, serving connections and accepting in rotation. Tight limits on types of modification, modification requests very structured, update not insert/delete, send warning email to user for every change. That is a start, at least.
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Programming

Regarding the protected variables access

Hello forum, I am siva working as programmer .I was blocked with the below issue so please help any of the forum memebers. testve.h class cv { protected : struct state; state& m_state; }; testVe.cpp struct state { m_size; } the above are 2 files which have the... (3 Replies)
Discussion started by: workforsiva
3 Replies

2. UNIX for Dummies Questions & Answers

How to access/run c programs on Putty?

Hi all, I wrote a couple noobie programs and had them compiled over Putty (using gcc), but I don't know what command I should use to run them. Please assume that I'm a complete noob when it comes to programming and putty commands. Thank you for your help! (1 Reply)
Discussion started by: Recycalable
1 Replies

3. Debian

Secure ftp access to outside chroot

I want to setup ftp on my home server running debian 5.0 I found this guide and have read it carefully. Virtual Hosting With PureFTPd And MySQL (Incl. Quota And Bandwidth Management) On Debian Lenny | HowtoForge - Linux Howtos and Tutorials Before I install/config it I want to know if its... (1 Reply)
Discussion started by: chipmunken
1 Replies

4. Shell Programming and Scripting

Unzipping files <password protected>

Hie Friends, I need your help once again. I have 77 “password protected” winzip files in linux/unix server. I want to decrypt it through an automated script. Password of every file is same and it is mhd*tt. Please help me. Usually I unzip it as follows, manually one by one. unzip <file name> ... (6 Replies)
Discussion started by: anushree.a
6 Replies

5. UNIX for Dummies Questions & Answers

What programs access shared library file

I was curious how to tell which programs are accessing a file (libobjc.A.dylib) in /usr/lib This file seems to be the culprit in a bunch of Safari crashes, and I just wanted to know if and what other programs use it. Also, I was curious what a good way to find out what files are being written... (4 Replies)
Discussion started by: glev2005
4 Replies

6. Solaris

secure access using sudo

I just need to know what should be done on a login user so that no one can access it except through sudo i.e. telnet server login: user NO ACCESS telnet server login: mylogin sudo - user <any command> ACCESS GRANTED thanks (0 Replies)
Discussion started by: melanie_pfefer
0 Replies
Login or Register to Ask a Question