Тёмный

One Matlab Command You Should Never Use - Why The Eval Command Is Awful [Matlab Rants] 

CodingLikeMad
Подписаться 3,4 тыс.
Просмотров 6 тыс.
50% 1

In this video we go over the Eval function in matlab, and discuss what it's for and why it's really insecure. The video is intended for educational purposes only - please be kind to each others code!

Наука

Опубликовано:

 

9 окт 2018

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 8   
@tejasj1718
@tejasj1718 5 лет назад
Surprisingly good quality for someone with so little subscribers. You earned a new sub!
@CodingLikeMad
@CodingLikeMad 5 лет назад
Thanks so much!
@CoffeeHolic93
@CoffeeHolic93 5 лет назад
Nice stuff. Was wondering why I've been told to steer clear of the Eval function. I no longer wonder that.
@CodingLikeMad
@CodingLikeMad 5 лет назад
Thanks so much! I like your username by the way. The video doesn't cover everything I would want it to, but I thought this was the easiest thing to make the point with. I would say a bigger practical issue is actually that I can't debug eval statements so easily. When you debug code, you go and look at what line of code is crashed on. But with eval, that line of code is in a variable - a variable that might not exist anymore if it is running a live system. The line of code could also be very complicated, depending on how the eval is being used. The security stuff though I think illustrates why this command is fundamentally broken. Glad you enjoyed :)
@CoffeeHolic93
@CoffeeHolic93 5 лет назад
@@CodingLikeMad Yeah that makes sense. All scripts and functions that I've made have been on the shorter side as I'm a biologist (At least once I turn in my thesis I am, hah) and I am "just" using matlab to automate data analysis, and since my scripts are never long they're generally easy to debug. :)
@rafaelbogoportalchagas824
@rafaelbogoportalchagas824 4 года назад
Great video! Learned a lot
@lmmartinez97
@lmmartinez97 3 года назад
I use it to evaluate symbolic expressions and obtain real values. Is there any other alternative? Pretty scary stuff if you ask me
@CodingLikeMad
@CodingLikeMad 3 года назад
This is almost exactly the case I am most worried about actually. User context matters a lot here. If you are using a web interface to supply those strings to be evaluated, that's a big risk. If it's just you, or just a small group of trusted coworkers, that's less concerning. If the feature is required, you cant find an alternative method, and the audience potentially includes a malicious actor, I would treat this the same way I would an sql enabled web server. This includes first and foremost cleaning the inputs of all symbols that are potentially malicious. Because () are on that list, you have a pretty big problem though. I would then consider layered security, making sure the matlab instance does not have privileges on the machine it should not have, making sure that sensitive data is not available on the machine if possible, and potentially encapsulating it in a virtual machine. I can't give great advise here though, I'm very much not an expert in this type of thing, and if I had a good solution I would have offered it. You will need to do your own research on this one, I am unable to provide a good solution via comment here because it is such a hard problem.
Далее
OVOZ
01:00
Просмотров 727 тыс.
MATLAB - 03 - Function Evaluation
24:29
Просмотров 4,4 тыс.
Write a function in MATLAB
4:29
Просмотров 361 тыс.
Custom MATLAB Functions in Simulink
7:56
Просмотров 97 тыс.
Symbolic Substitution
3:24
Просмотров 28 тыс.
The Problem with Wind Energy
16:47
Просмотров 733 тыс.