Jump to content




BukkitOS The OS of The Future - In Progress

computer

  • This topic is locked This topic is locked
37 replies to this topic

#1 CrosS_light

  • Members
  • 15 posts

Posted 17 April 2013 - 09:51 AM

Hello,

Im CrosS_Light and im trying to Create my OWN OS.
I will show you my Ideas:

Quote

BukkitOS

Account System

I will Incloude an Account System for my own AppStore


Antivirus

This is Very esay i will check for commands that are in the Blacklist and

will Show the User wat the Program can do


Themes

I will that YOU can create your OWN Styles and Upload them to the AppStore


Languages

I mustn't talk about that


Screen


Librarys

-You can Load Librarys for the OS and put them into the Librarys Folder


Startup

while the system will startup it loads all Librarys checks for update and checks all files


I need some Helper for The OS
if any one want to be one please write me
if any one has an idea please poste that here

CrosS_light

#2 H4X0RZ

  • Members
  • 1,315 posts
  • LocationGermany

Posted 17 April 2013 - 09:58 AM

I can make a German translation ^_^

#3 Bubba

    Use Code Tags!

  • Moderators
  • 1,142 posts
  • LocationRHIT

Posted 17 April 2013 - 10:01 AM

If you do an "antivirus", don't use string.find or any such thing. It's almost impossible to block every possible string form of a function. Instead, use function replacement.

#4 Sammich Lord

    IRC Addict

  • Members
  • 1,212 posts
  • LocationThe Sammich Kingdom

Posted 17 April 2013 - 10:04 AM

View PostBubba, on 17 April 2013 - 10:01 AM, said:

If you do an "antivirus", don't use string.find or any such thing. It's almost impossible to block every possible string form of a function. Instead, use function replacement.
I think sandboxing is a better term than function replacement. For instance, to sandbox a program you can easily override the functions you don't want them to use and replace them with functions that restrict usage of the functions on certain parts of the computer.

#5 Bubba

    Use Code Tags!

  • Moderators
  • 1,142 posts
  • LocationRHIT

Posted 17 April 2013 - 10:10 AM

View PostSammich Lord, on 17 April 2013 - 10:04 AM, said:

View PostBubba, on 17 April 2013 - 10:01 AM, said:

If you do an "antivirus", don't use string.find or any such thing. It's almost impossible to block every possible string form of a function. Instead, use function replacement.
I think sandboxing is a better term than function replacement. For instance, to sandbox a program you can easily override the functions you don't want them to use and replace them with functions that restrict usage of the functions on certain parts of the computer.

... How is what you just said not function replacement? :P

If by sandboxing you mean using setfenv to change the environment, that would be good if you only wanted users to be able to run a few things. Otherwise, I feel like it's excessive.

And honestly, in general, I don't feel a need for an "antivirus". I can read every program that people write, and if I don't understand it then I won't run it. Simple as that :)

#6 Sammich Lord

    IRC Addict

  • Members
  • 1,212 posts
  • LocationThe Sammich Kingdom

Posted 17 April 2013 - 10:16 AM

View PostBubba, on 17 April 2013 - 10:10 AM, said:

View PostSammich Lord, on 17 April 2013 - 10:04 AM, said:

View PostBubba, on 17 April 2013 - 10:01 AM, said:

If you do an "antivirus", don't use string.find or any such thing. It's almost impossible to block every possible string form of a function. Instead, use function replacement.
I think sandboxing is a better term than function replacement. For instance, to sandbox a program you can easily override the functions you don't want them to use and replace them with functions that restrict usage of the functions on certain parts of the computer.

... How is what you just said not function replacement? :P

If by sandboxing you mean using setfenv to change the environment, that would be good if you only wanted users to be able to run a few things. Otherwise, I feel like it's excessive.

And honestly, in general, I don't feel a need for an "antivirus". I can read every program that people write, and if I don't understand it then I won't run it. Simple as that :)
I just think calling it sandboxing sounds better. But I agree that you really don't need an "anti-virus".

#7 Bubba

    Use Code Tags!

  • Moderators
  • 1,142 posts
  • LocationRHIT

Posted 17 April 2013 - 10:18 AM

View PostSammich Lord, on 17 April 2013 - 10:16 AM, said:

View PostBubba, on 17 April 2013 - 10:10 AM, said:

View PostSammich Lord, on 17 April 2013 - 10:04 AM, said:

View PostBubba, on 17 April 2013 - 10:01 AM, said:

If you do an "antivirus", don't use string.find or any such thing. It's almost impossible to block every possible string form of a function. Instead, use function replacement.
I think sandboxing is a better term than function replacement. For instance, to sandbox a program you can easily override the functions you don't want them to use and replace them with functions that restrict usage of the functions on certain parts of the computer.

... How is what you just said not function replacement? :P

If by sandboxing you mean using setfenv to change the environment, that would be good if you only wanted users to be able to run a few things. Otherwise, I feel like it's excessive.

And honestly, in general, I don't feel a need for an "antivirus". I can read every program that people write, and if I don't understand it then I won't run it. Simple as that :)
I just think calling it sandboxing sounds better. But I agree that you really don't need an "anti-virus".

Oh I see. Missed the word "term" in your reply XD I thought you were saying that you should sandbox instead of function replace.

#8 CrosS_light

  • Members
  • 15 posts

Posted 17 April 2013 - 10:41 AM

I will take al look but i will first do it with strin.find and then i will try sandboxing.


Clueless
Freack100

Spricht du Deutsch?

#9 Bubba

    Use Code Tags!

  • Moderators
  • 1,142 posts
  • LocationRHIT

Posted 17 April 2013 - 10:51 AM

View PostCrosS_light, on 17 April 2013 - 10:41 AM, said:

I will take al look but i will first do it with strin.find and then i will try sandboxing.


Clueless
Freack100

Spricht du Deutsch?

Err, sorry mate but string.find is probably the absolute worst method of antivirus there is around. Watch this. No matter what kind of string finder you use I will still be able to get around it:
--The string you are searching for here is 'sleep'
local function getCommand()
	local final = ""
	for i,v in ipairs({115, 108, 101, 101, 112}) do
	  final = final..string.char(v)
	end
	return final
end

loadstring("caller = "..getCommand())

caller(3) --Caller now calls the sleep command.


#10 CrosS_light

  • Members
  • 15 posts

Posted 17 April 2013 - 10:53 AM

i know but i dont know how sandboxing works
can you help me?


p.s.
{115, 108, 101, 101, 112} <---- This is NICE!

#11 Bubba

    Use Code Tags!

  • Moderators
  • 1,142 posts
  • LocationRHIT

Posted 17 April 2013 - 11:02 AM

View PostCrosS_light, on 17 April 2013 - 10:53 AM, said:

i know but i dont know how sandboxing works
can you help me?


p.s.
{115, 108, 101, 101, 112} <---- This is NICE!

Sure :)

Function replacement, or sandboxing as some like to call it, is actually pretty simple. All you have to do is:

local _oldPrint = print --Save the print function so we can use it later

local function yourReplacementFunction(args)
  if args == "invalid" then
	_oldPrint("Hey. I don't want you to say that.")
	return false
  end
  _oldPrint(args)
end

print = yourReplacementFunction

Now, whenever people use the print function, it will call yourReplacementFunction instead :) And because _oldPrint is localized, programs outside of the OS will not be able to use it. You can also use environments to protect it from inside the program, but that's more of an advanced concept that I wouldn't bother messing with until you're further along. If you want to check it out, here's a link to a tutorial: http://www.lua.org/pil/14.html

#12 CrosS_light

  • Members
  • 15 posts

Posted 17 April 2013 - 11:06 AM

that means if i use it like so


local _oldPrint = fs.delete

local function fs.delete(args)
if args == "invalid" then
_oldPrint("This will output an error :D")
return false
end
_oldPrint(args)
end

print = fs.delete

#13 Bubba

    Use Code Tags!

  • Moderators
  • 1,142 posts
  • LocationRHIT

Posted 17 April 2013 - 11:07 AM

View PostCrosS_light, on 17 April 2013 - 11:06 AM, said:

that means if i use it like so


local _oldPrint = fs.delete

local function fs.delete(args)
if args == "invalid" then
_oldPrint("This will output an error :D")
return false
end
_oldPrint(args)
end

print = fs.delete

Well yeah that "works" as in it will run, but you didn't take away the fs.delete function. You took away the print function. I think you're looking for something like this:

local oldDelete = fs.delete
fs.delete = function(...)
  --Limit what goes into fs.delete here
  return fs.delete(...)
end


#14 CrosS_light

  • Members
  • 15 posts

Posted 17 April 2013 - 11:09 AM

oh yahh i see it the last line right?

#15 Bubba

    Use Code Tags!

  • Moderators
  • 1,142 posts
  • LocationRHIT

Posted 17 April 2013 - 11:10 AM

View PostCrosS_light, on 17 April 2013 - 11:09 AM, said:

oh yahh i see it the last line right?

Yup. The main part of function replacement is actually doing the replacement :) All the other stuff is just making sure that you're able to call the old function and creating an alternative for them to call instead.

#16 CrosS_light

  • Members
  • 15 posts

Posted 17 April 2013 - 11:12 AM

Okay thanks i will Try it and give Credits for Helping :D

#17 SuicidalSTDz

    Permutator of Strings

  • Members
  • 1,308 posts
  • LocationPennsylvania

Posted 17 April 2013 - 11:16 AM

Just out of curiosity, why is this called BukkitOS?

#18 CrosS_light

  • Members
  • 15 posts

Posted 17 April 2013 - 11:19 AM

first it was call'd LiquidOS but i have see that the name is from an other os and so i call id bukkitOS :D

If i have the First Screens i will post some screens


i will load the sandbox as an API

so i can use it in other programs

#19 CrosS_light

  • Members
  • 15 posts

Posted 17 April 2013 - 11:44 AM

local FS_oldOpen = fs.open
local FS_oldDelete = fs.delete
local FS_oldCopy = fs.copy
local FS_oldMove = fs.move
local FS_oldMakeDir = fs.makeDir
local IO_oldOpen = io.open
local OS_oldLoadApit = os.loadAPI
local OS_oldUnloadApi = os.unloadAPI
local OS_oldShutdown = os.shutdown
local OS_oldReboot = os.reboot
local OS_oldSleep = os.sleep
local OS_oldRun = os.run
local SHELL_oldSetDir = shell.setDir
local SHELL_oldSetAlias = shell.setAlias
local SHELL_oldClearAlias = shell.clearAlias
local SHELL_oldRun = shell.run



This will be Secure :D

#20 CrosS_light

  • Members
  • 15 posts

Posted 17 April 2013 - 11:59 AM

why can i get the programm that runs the command? i will add Whitelist and Blacklist





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users