Os Project Team7
Os Project Team7
CSE - 316
(OPERATING SYSTEM)
Submitted to:
Ms. Gagandeep Kaur
1. )Project Overview:
In contemporary computing, system calls are the interface between user programs and the
operating system. Direct access to system calls is a very serious security risk,
including privilege escalation, unauthorized access, and system vulnerabilities. This
project focuses on designing a User-Friendly System Call Interface
that is easy to use yet more secure.
The major goal is to design an interface that denies unauthorized use of system
calls by applying authentication methods, i.e., multi-factor authentication (MFA) and role-
based access control (RBAC). The system will also offer in-depth logging and
monitoring features to monitor system call operations so that transparency and
security are assured.
Through the use of a structured and safe interface, this project will defend system
resources from abuse while enabling authorized users
to execute required operations effectively. The end system will not only enhance security
but also make system call interactions easier for users with different technical skills.
2. )Module-Wise Breakdown:
To facilitate effective and well-organized implementation, the project has been split into
three main modules: Authentication & Access Control, Secure System Call Interface, and
Logging & Monitoring
System. These modules are individually important for ensuring security and user-
friendliness.
Upon connecting these three modules, the system provides a safe, user-centric,
and suitably monitored infrastructure for making system calls with lesser security threats
3. ) Functionalities:
The system is meant to offer a secure and easy-to-use interface for making system calls
while avoiding unauthorized access. Each module adds unique functionalities
to improve security, usability, and monitoring.
These features blend together to provide an open, secure, and efficient system
that protects important functions while making it easy to use.
4.) Technology Used:
To ensure robust and efficient implementation, the project utilizes a combination of
programming languages, frameworks, and tools tailored for security, authentication, and
system monitoring.
Python (Backend)
By combining these technologies, the system ensures high security, efficient logging, and
user-friendly interface while maintaining flexibility for future enhancements.
5. Flow Diagram:
Flow of Execution:
1. User Accesses Web Interface → Enters authentication details.
2. Authentication Process → JWT token issued if valid credentials are provided.
3. User Requests System Call Execution → Inputs command via web interface.
4. Backend Validates Request → Checks authentication and permissions.
5. System Call Execution → Runs allowed system calls securely using subprocess.
6. Logging Mechanism → Stores executed commands in a log file.
7. Response Sent to Frontend → Displays output or error message
7.) Conclusion and Future Scope:
The User-Friendly System Call Interface for Advanced Security effectively presents an easy-
to-use yet secure means of allowing users to make system calls while authenticating and
logging processes. Through the use of JWT-based authentication, a Flask backend server,
and a web interface, the system blocks unauthorized access and has elaborate logs
for monitoring security. The system increases system
security through limiting commands by authentication level as well as logging all system
calls made so that they can be audited.
Future Scope:
Role-Based Access Control (RBAC): Expand the
authentication mechanism to include various user roles with limited access based on
permissions.
Advanced Logging & Monitoring: Provide real-time monitoring dashboards for system
call usage analytics and security alerts.
Secure API Gateway: Use API rate limiting and other layers of security to avoid abuse.
Encryption of Logs: Save logs securely with encryption so they can't be tampered
with unauthorized.
This project builds a solid foundation for secure system call execution,
and subsequent improvements will continue to enhance its security and robustness.
8.) REFERENCES:
Appendix:
Project Overview:
A secure system call execution interface with authentication, logging, and a user-friendly
web UI to prevent unauthorized access.
Module-Wise Breakdown
1. Authentication & Security – Implements JWT authentication and role-based access.
2. System Call Execution – Securely runs allowed system commands and logs them.
3. Web Interface – HTML-based UI for user interaction with API.
Functionalities:
• Authentication: Secure login with JWT.
• System Call Execution: Restricted and logged command execution.
• Web Interface: User-friendly UI to execute and view results.
Technology Used:
• Languages: Python (Backend), HTML, CSS, JavaScript (Frontend).
• Libraries & Tools: Flask, Flask-JWT-Extended, SQLite, subprocess.
• Other Tools: GitHub (Version Control), Postman (API Testing).
Execution Plan:
1. Build Flask backend with authentication.
2. Implement secure system call execution with logging.
3. Create HTML frontend to interact with the API.
4. Test & deploy the system.
C.) Solution/Code;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Secure System Call Interface</title>
<style>
body { font-family: Arial, sans-serif; text-align: center; background: #f4f4f4; padding:
50px; }
.container { width: 400px; margin: auto; background: white; padding: 20px; border-
radius: 10px; box-shadow: 0px 0px 10px rgba(0,0,0,0.1); }
input, button { width: 90%; padding: 10px; margin: 10px; border-radius: 5px; border:
1px solid #ddd; }
button { background-color: #28a745; color: white; cursor: pointer; }
button:hover { background-color: #218838; }
.hidden { display: none; }
#log-container { text-align: left; max-height: 200px; overflow-y: auto; border: 1px solid
#ddd; padding: 10px; background: #fff; }
</style>
</head>
<body>
<script>
let token = "";
let role = "";
function login() {
const username = document.getElementById("username").value;
const password = document.getElementById("password").value;
fetch("http://127.0.0.1:5000/login", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ username, password })
})
.then(response => response.json())
.then(data => {
if (data.token) {
token = data.token;
role = data.role;
document.getElementById("auth-section").classList.add("hidden");
document.getElementById("system-call-section").classList.remove("hidden");
function executeCommand() {
const command = document.getElementById("command").value;
fetch("http://127.0.0.1:5000/execute", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${token}`
},
body: JSON.stringify({ command })
})
.then(response => response.json())
.then(data => {
document.getElementById("command-output").innerText = data.output || "Error
executing command!";
fetchLogs();
});
}
function fetchLogs() {
fetch("http://127.0.0.1:5000/logs", {
method: "GET",
headers: { "Authorization": `Bearer ${token}` }
})
.then(response => response.json())
.then(data => {
document.getElementById("log-container").innerHTML = data.logs.map(log =>
`<p>${log}</p>`).join("");
});
}
</script>
</body>
</html>
Python:
app = Flask(__name__)
app.config["JWT_SECRET_KEY"] = "your_secret_key"
jwt = JWTManager(app)
@app.route("/login", methods=["POST"])
def login():
data = request.json
username, password = data.get("username"), data.get("password")
@app.route("/execute", methods=["POST"])
@jwt_required()
def execute_command():
data = request.json
command = data.get("command")
user_info = get_jwt_identity()
role = user_info["role"]
try:
output = subprocess.check_output(command, shell=True, text=True)
logs.append(f"{datetime.datetime.now()} - {user_info['username']} executed:
{command} -> SUCCESS")
return jsonify({"output": output}), 200
except subprocess.CalledProcessError:
logs.append(f"{datetime.datetime.now()} - {user_info['username']} executed:
{command} -> FAILED")
return jsonify({"error": "Command execution failed"}), 400
@app.route("/logs", methods=["GET"])
@jwt_required()
def get_logs():
user_info = get_jwt_identity()
if user_info["role"] != "admin":
return jsonify({"error": "Permission denied"}), 403
if __name__ == "__main__":
app.run(debug=True)