Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed escape sequence vulnerability #31

Merged
merged 1 commit into from
Jun 10, 2015

Conversation

avere001
Copy link
Contributor

Using ANSI escape sequences, I have managed to trick the calcgrade.sh script into displaying incorrect grades for my quiz0 and quiz1 scores, but this technique can be applied to any assignments. My particular attack has some minor limitations as it assumes the grader has a black background for their terminal and it will change any red text on their screen to black. However, it is conceivable that there exists a similar method that does not have the same limitations.

My proposed fix filters the input from the grade file to ensure that only numbers/decimal points are printed to the screen, thus eliminating the possibility of any control sequence modifying the content of the screen.

Before fix

before_fix

After fix

after_fix

mikeizbicki added a commit that referenced this pull request Jun 10, 2015
fixed escape sequence vulnerability
@mikeizbicki mikeizbicki merged commit 27a3236 into mikeizbicki:master Jun 10, 2015
@mikeizbicki
Copy link
Owner

Awesome! I'm letting your modified grades remain as is. You officially have the highest cs100 score ever at 437%!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants