Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
bca95ba
First directory traversal challenge on shoe vendor website
pchaigno Jul 9, 2014
5627948
Second directory traversal challenge on shoe vendor website
pchaigno Jul 10, 2014
19542c2
Unvalidated Redirect challenge on Central Authentication Service
pchaigno Jul 17, 2014
df1b246
First bruteforce challenge on router web interface
pchaigno Jul 21, 2014
bd295d8
Third bruteforce challenge on social network login page
pchaigno Jul 21, 2014
d2d7709
Second bruteforce challenge on a wiki login page
pchaigno Jul 26, 2014
57f92e9
First SQL injection challenge on a printer web interface
pchaigno Jul 26, 2014
7b50b8a
Second SQL injection challenge on a forum login page
pchaigno Jul 31, 2014
1b667aa
New user in the SQLite database for the SQL injection. The student mu…
pchaigno Jul 31, 2014
dfc515c
Third SQL injection challenge on a forum login page with addslashes p…
pchaigno Aug 1, 2014
29d9610
Correct small inconsistency in the challenge's description
pchaigno Aug 1, 2014
0809e64
Reset password process on a project website for forgotten password ch…
pchaigno Aug 5, 2014
9461d4b
HTTP Split and Join challenge to bypass a WAF on a search engine
pchaigno Aug 5, 2014
ef03b16
First MITM challenge with a proxy on a smartphone application
pchaigno Aug 8, 2014
b2cf744
Second MITM challenge on a smartphone application with an attempted a…
pchaigno Aug 9, 2014
e973b6f
Challenge with an unanchored regular expression
pchaigno Aug 10, 2014
d4487ab
DDoS challenge on a XML API
pchaigno Aug 11, 2014
03daffd
CSRF challenge on a file hosting service
pchaigno Aug 11, 2014
dd5bbfa
Fix oversight in the regex solution for the challenge Sell your pet
pchaigno Aug 11, 2014
6b5ef43
Local File Inclusion challenge on a pictures upload website
pchaigno Aug 12, 2014
2f3fd9b
Merge pull request #17 from pchaigno/challenge-xml-api
pchaigno Aug 18, 2014
7b06ac4
Merge branch 'challenge-wiki' into challenges
pchaigno Aug 18, 2014
438cec2
Merge branch 'challenge-shoes1' into challenges
pchaigno Aug 18, 2014
bee2105
Merge branch 'challenge-shoes2' into challenges
pchaigno Aug 18, 2014
65e70e4
Merge branch 'challenge-mitm1' into challenges
pchaigno Aug 18, 2014
c678533
Merge branch 'challenge-mitm2' into challenges
pchaigno Aug 18, 2014
8d330e8
Merge branch 'challenge-sell-your-pet' into challenges
pchaigno Aug 18, 2014
219be0e
Merge branch 'challenge-router' into challenges
pchaigno Aug 18, 2014
5817209
Merge branch 'challenge-printer' into challenges
pchaigno Aug 18, 2014
9b94b5e
Merge branch 'challenge-nafo' into challenges
pchaigno Aug 18, 2014
e91611c
Merge branch 'challenge-pictures' into challenges
pchaigno Aug 18, 2014
4f936c9
Merge branch 'challenge-cas' into challenges
pchaigno Aug 18, 2014
5ffd019
Merge branch 'challenge-cafebook' into challenges
pchaigno Aug 18, 2014
4d0950b
Merge branch 'challenge-bigblue' into challenges
pchaigno Aug 18, 2014
c6e0dd7
Merge branch 'challenge-copybox' into challenges
pchaigno Aug 18, 2014
290d551
Merge branch 'challenge-alien1' into challenges
pchaigno Aug 18, 2014
c151195
Merge branch 'challenge-alien2' into challenges
pchaigno Aug 18, 2014
719e49f
Greek string translation introduced
antonis-manaras May 19, 2015
c99d4c3
Fix error with multiline gettext translations
pchaigno May 19, 2015
0ded1f2
Corrected format in .po file
antonis-manaras May 19, 2015
c82e33a
First go at fixing the translations
pchaigno May 20, 2015
3e3b7c0
Add PHP_CodeSniffer as a project dependency for development"
tapaswenipathak Jul 21, 2015
ddefbd6
Add sniff files and ruleset for stricter PSR-1 and PSR-2
tapaswenipathak Jul 21, 2015
62f542e
Base folder fixed
tapaswenipathak Jul 31, 2015
bfa3438
Update how to have standards compliance
tapaswenipathak Jul 21, 2015
f438f13
pre commit hook script
tapaswenipathak Jul 22, 2015
f7d173d
Instructions to Run Pre Commit Hook
tapaswenipathak Jul 22, 2015
5d0aa4d
Merge pull request #167 from tapasweni-pathak/next-dev
pchaigno Aug 7, 2015
86ac15a
admin/controller/*.php Fixed
tapaswenipathak Aug 1, 2015
aa39995
admin/*.php done
tapaswenipathak Aug 1, 2015
b1475ad
admin/model done
tapaswenipathak Aug 5, 2015
86c77df
admin/pages/*.php Done
tapaswenipathak Aug 6, 2015
a4e1b1a
docs/*.php Done
tapaswenipathak Aug 6, 2015
d12172d
pages/*.php Done
tapaswenipathak Aug 6, 2015
0dae1ab
user/plugins/*.php Done
tapaswenipathak Aug 7, 2015
fd2d978
user/themes/*.php Done
tapaswenipathak Aug 7, 2015
a80006b
assests/*.php Done, removed blank file
tapaswenipathak Aug 7, 2015
c5f75c5
Some part of esapi/* done
tapaswenipathak Aug 7, 2015
f797268
controller/*.php Done
tapaswenipathak Aug 8, 2015
04f428d
Scoring rule public function name change relfect
tapaswenipathak Aug 8, 2015
3780b8b
model/common/*.php Done
tapaswenipathak Aug 8, 2015
8ae98a4
Reflect public function name change in model/UserScore
tapaswenipathak Aug 8, 2015
6589e7f
Revert "Some part of esapi/* done"
tapaswenipathak Aug 8, 2015
0183db2
admin/* phpcbf fixing
tapaswenipathak Aug 8, 2015
a9ac0d1
model/* phpcbf automatic fixing
tapaswenipathak Aug 8, 2015
9032364
controller/* phpcbf automatic fixes
tapaswenipathak Aug 8, 2015
ed86102
leave views, remove underscore
tapaswenipathak Aug 21, 2015
06d6b42
Merge branch 'next-dev' into fix_codesniffer_errors
tapaswenipathak Aug 21, 2015
e2539dc
merge done
tapaswenipathak Aug 22, 2015
383c542
Options saves parameters to the database, remove underscore for priva…
tapaswenipathak Aug 22, 2015
90e00ed
r/typ/type
tapaswenipathak Aug 22, 2015
9b0bb4c
r/$_action_type/self::$_action_type
tapaswenipathak Aug 22, 2015
5ea2d77
go fucntion back again
tapaswenipathak Aug 22, 2015
8f797a1
add missing this before _invalidChallenge()
tapaswenipathak Aug 24, 2015
18fb53a
self::$_action_type in update query parameters
tapaswenipathak Aug 24, 2015
a641dd1
fix lost else
tapaswenipathak Aug 24, 2015
a7044ae
travis ci done
tapaswenipathak Sep 1, 2015
8e3f299
some cleaning
tapaswenipathak Sep 2, 2015
9334e2b
phpunit coverage reports
tapaswenipathak Sep 4, 2015
36151e2
Merge pull request #171 from tapasweni-pathak/fix_codesniffer_errors
pchaigno Sep 4, 2015
6217ef5
Merge remote-tracking branch 'upstream/tapasweni_scs2015' into Add-Tr…
tapaswenipathak Sep 5, 2015
e4d3d67
install db
tapaswenipathak Sep 5, 2015
6d09dac
remove ignore for config.inc.php
tapaswenipathak Sep 5, 2015
ffbcbc0
test for model/common test cases
tapaswenipathak Sep 5, 2015
69cf227
config for travis
tapaswenipathak Sep 5, 2015
63a8747
Merge pull request #182 from tapasweni-pathak/Add-Travis-CI
northdpole Oct 18, 2015
957f212
Very initial Hacakdemic V2 ansible config, will update as soon as we …
northdpole Oct 30, 2015
cada7e1
replaced our password hash with the official one
northdpole Oct 31, 2015
3a451a8
Merge pull request #191 from Hackademic/remove_external_bcrypt
northdpole Feb 27, 2016
ab72448
fixes indentation in Utils Model
arpitsingla96 Mar 4, 2016
99125ac
adds null field validation in registration form
arpitsingla96 Mar 4, 2016
2be8684
added sandboxing
northdpole Mar 7, 2016
af785ce
Added buffer overflow challenges
pdhoot Mar 7, 2016
efa1c13
Added the challenge2 binary
pdhoot Mar 9, 2016
f503f9d
Added cucumber tests
spyrosavl Mar 14, 2016
cecf9d0
Added cucumber tests
spyrosavl Mar 14, 2016
2cf8ca6
Lettuce test for admin
spyrosavl Mar 17, 2016
0198299
Lettuce test for admin
spyrosavl Mar 17, 2016
a06a243
Create Dockerfile
NeoAtZion Mar 22, 2016
6cca8b7
Update index.php
NeoAtZion Mar 22, 2016
35a10c1
Update login.php
NeoAtZion Mar 22, 2016
3ff638b
Update Dockerfile
NeoAtZion Mar 22, 2016
b4fb2d8
Add binary challenge
Redridge Mar 23, 2016
7f68c94
Added VPTR Challange
pdhoot Mar 28, 2016
4b0b22f
Added GDB tutorial
pdhoot Apr 15, 2016
01e277e
Merge pull request #225 from Redridge/next-dev
northdpole May 8, 2016
e1d2353
Merge pull request #224 from bere13/next-dev
northdpole May 8, 2016
585d115
Merge pull request #217 from spyrosavl/next-dev
northdpole May 8, 2016
13381ff
Merge pull request #201 from arpit270896/register_form_validation
northdpole May 8, 2016
c8475cc
Merge remote-tracking branch 'origin/next-dev' into tapasweni_scs2015
northdpole May 8, 2016
bf00d74
Merge branch 'tapasweni_scs2015' into next-dev
northdpole May 8, 2016
ea5cb65
Merge branch 'challenges' of https://github.com/pchaigno/hackademic i…
northdpole May 8, 2016
807a9a3
Merge branch 'pchaigno-challenges' into next-dev
northdpole May 8, 2016
82dc5ac
Merge branch 'fix-gettext-multiline' of https://github.com/pchaigno/h…
northdpole May 8, 2016
4028364
Merge branch 'pchaigno-fix-gettext-multiline' into next-dev
northdpole May 8, 2016
0e3edda
Merge pull request #150 from antonis-manaras/gr-translation
northdpole May 8, 2016
e421735
Update CONTRIBUTING.md
northdpole May 9, 2016
fc33f04
Update CONTRIBUTING.md
northdpole May 9, 2016
f44bac4
removed the config file
northdpole Jun 11, 2016
ce0d848
bugfixing 4 appsec
northdpole Jun 19, 2016
2540264
first round of bugfixing 4 appsec2016
northdpole Jun 26, 2016
582627e
2nd round of bugfixing for appsec2016 have i said that we need more u…
northdpole Jun 26, 2016
865ccf5
removed useless getPassUtil() method
northdpole Jun 27, 2016
59c58d7
fix some typos
uberspot Jun 27, 2016
063d6fc
removed installation of example challenge
northdpole Jun 27, 2016
c22a6a3
Merge branch 'appsec' of github.com:Hackademic/hackademic into appsec
northdpole Jun 27, 2016
98c228f
removed idea files
northdpole Jun 29, 2016
306d00a
added xmlparsing for challenges
rtgdk Feb 26, 2017
f04c0d1
added xmlparsing for challenges -changed error catching
rtgdk Feb 26, 2017
84d945c
added xml parser for challenges in python folder
rtgdk Feb 28, 2017
8cead37
modifying encodeCharacter method
thisissorna Aug 16, 2017
efe37b4
Merge pull request #237 from thisissorna/next-dev
northdpole Mar 13, 2018
69c8dff
Merge pull request #235 from rtgdk/next-dev
northdpole Mar 13, 2018
4e2a4c9
Merge pull request #151 from pchaigno/fix-translations
northdpole Mar 13, 2018
7bfa821
Merge pull request #188 from Hackademic/ansible
northdpole Mar 13, 2018
e8d5b96
Merge pull request #212 from pdhoot/new
northdpole Mar 13, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
__MACOSX/*
.project/
*.patch
config.inc.php
view/compiled_view/
pages/test/
*.swp
Expand All @@ -11,3 +10,4 @@ test
nbproject/
composer.lock
vendor/
.idea/
1 change: 0 additions & 1 deletion .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
ErrorDocument 403 /view/errors/403.html
ErrorDocument 404 /view/errors/404.html
ErrorDocument 500 /view/errors/500.html
ErrorDocument 509 /view/errors/509.html

# Disable directory indexing
Options All -Indexes
Expand Down
39 changes: 39 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
sudo: true
language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm
- nightly

env:
- DB=mysql


before_script:
#- curl -sS https://getcomposer.org/installer | php; sudo mv composer.phar /usr/local/bin/composer
#- composer install
- mysql -e "create database IF NOT EXISTS hackademic;" -uroot
- mysql -uroot "hackademic" < "installation/sql/db.sql"

script:
# - phpunit --configuration phpunit_mysql.xml --coverage-text
- vendor/bin/phpunit --configuration phpunit_mysql.xml --coverage-html ./report hackademic_devtests/model/common/class.PageTest.php

install:
- composer install

notifications:
irc:
channels: "irc.freenode.org#hackademic-dev"
template:
- "%{repository}@%{branch}: %{message} (%{build_url})"
on_success: change
on_failure: change
use_notice: true
email: false

after_success:
coveralls --rcfile=.coveragerc
70 changes: 70 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,73 @@ To write your own tests you can check `<tests_dir>/admin/model/AddUserController
4. In order to get a unique css path for the element you want to click you can inspect it in Firefox or Chrome and right-click on the element and select Copy CSS Path
5. Cleanup after your test, `tearDown()` exists for that reason too.
6. Each class should test one feature. E.g. `AddUserTest` should test if a user can be added sucessfully.



Standard Compliance:
--------------------

Before committing code, please make sure your code is PSR - 0, PSR - 1, PSR - 2, PSR - 3 and PSR - 4 compliant.

We use a stricter version of PSR - 1 and PSR - 2 over PHP_CodeSniffer. All the related sniff files and ruleset.xml are present in development/scripts.

To check your code against these standards :

0. Place the PSR-1 inside /usr/share/php/PHP/CodeSniffer/Standards.

```
cp hackademic/development/scripts/PSR-1/ /usr/share/php/PHP/CodeSniffer/Standards/
```
1. Then Set PSR-1 as the default sniff for CodeSniffer using

```
phpcs --config-set default_standard PSR-1
```

2. Follow the same steps for making the code PSR-2 complaint.


To Run Code Sniffer by yourself :

0. To see the warnings and errors

```
phpcs filename
```
or

```
phpcs filename | less
```
q to exit.

1. To fix warnings and errors automatically

```
phpcbf filename
```


Pre Commit Hook:
----------------

Adding pre commit hook automatically checks for PHP_CodeSniffer and PHP_CS-fixer
errors. To run it

0. Rename .git/hooks/pre-commit.sample to pre-commit
1. Add the following to the end of this file

```
exec git diff --cached | development/scripts/PSR\ Compliance\ Pre\ Commit.php
```

2. Make sure the file is executable

```
chmod a+x .git/hooks/pre-commit
```
How to make Git to ignore file permission changes:
-------------------------------------------------
```
git config core.fileMode false
```
Binary file added Locale/en_US/LC_MESSAGES/messages.mo
Binary file not shown.
File renamed without changes.
Binary file added Locale/fr_FR/LC_MESSAGES/messages.mo
Binary file not shown.
File renamed without changes.
54 changes: 54 additions & 0 deletions Python/xmlparser.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/usr/bin/env python3
""" # Python version = 3
Parses the xml files and reports if correctly formatted or not with the format of the files in challenges folder.(check for both format : before ch010 and after that)
Currently run through terminal/command prompt by specifying the relative file path and output on prompt.
Can be extended for reporting non nullable fields errors.
Can be easily integrated with the current system.

To run on terminal:
Go to the file folder in terminal/command prompt.
Type python3 xmlparser.py
Enter the file name.
* ----------------------------------------------------------------
OWASP Hackademic Challenges Project
* ----------------------------------------------------------------
* Rohit Lodha
* ----------------------------------------------------------------"""

import xml.etree.ElementTree as ET
import xml
def xmlparser(xmlfile):
try:
tree = ET.parse(xmlfile) #Checking if file exist, if exist parse it and store it in tree
try :
root = tree.getroot() #getting the root
if (len(root)==6): #For challenges with "level" and "duration" fields
required_fields=["title","author","category","description","level","duration"]
for field in required_fields:
if (root.find(field)!=None): #searching for every required field
continue
else :
print("Incorrect formatting of required fields.")
exit()
print("Correctly formatted!")
elif (len(root)==4) : #For challenges without "level" and "duration" fields
required_fields=["title","author","category","description"]
for field in required_fields:
if (root.find(field)!=None): #searching for every required field
continue
else :
print("Incorrect formatting of required fields.")
exit()
print("Correctly formatted!")
else :
print("Incorrect formatting of necessary fields.")
except ET.ParseError as Error:
print(Error) #prints the line no. on which error occured
except FileNotFoundError:
print("File Not Found.")
except ET.ParseError as Error:
print(Error)

if __name__=="__main__" : #code to execute if called from command-line
a = input("Enter File name relative to this file.\n") #Taking file name input
xmlparser(a) #calling xmlparser
35 changes: 16 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,46 @@
OWASP Hackademic Challenges project
===================================

The **OWASP Hackademic Challenge** project helps you test your knowledge on web application security. You can use it to actually attack web applications in a realistic but also controllable and safe environment.
The **OWASP Hackademic Challenge** project helps you test your knowledge on web application security. You can use it to actually attack web applications in a realistic but also controlled and safe environment.

The latest stable version is in `next` branch, the development version is in `next-dev`.
The latest stable version is in the `next` branch, the development version is in `next-dev`.


Description
-----------

The Hackademic challenges implement realistic scenarios with known vulnerabilities in a safe, controllable environment. Users can attempt to discover and exploit these vulnerabilities in order to learn important concepts of information security through the attacker's perspective.
The Hackademic challenges implement realistic scenarios with known vulnerabilities in a safe, controlled environment. Users can discover and exploit the vulnerabilities presented in the challenges and learn important concepts of information security through the perspective of an attacker.

Currently, there are 10 scenarios available.

You can choose to start from the one that you find most appealing, although we suggest to follow the order presented on the first page. We intend to expand the available challenges with additional scenarios that involve cryptography and even vulnerable systems implemented in downloadable virtual machines.


You can choose to start from the one that you find most appealing, although we suggest you follow the order presented on the first page. We intend to expand the available challenges with additional scenarios that involve cryptography and even vulnerable systems presented as downloadable virtual machines.


Deployment
----------

Dependencies of Hackademic involve a web server (Apache, nginx) with PHP and Mysql/MariaDB connected with it. Make sure you have installed these before you start deploying Hackademic. We recommand to use Apache with MySQL. See [Digital Ocean's website](https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu) for a good tutorial under Ubunt. See [WampServer](http://www.wampserver.com/en/) to set up the environnement under Windows.
Dependencies for Hackademic involve a web server (Apache, nginx) with PHP and Mysql/MariaDB connected to it. Make sure you have these installed before you start deploying Hackademic. We recommend to use Apache with MySQL. See [Digital Ocean's website](https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu) for a good tutorial under Ubuntu. See [WampServer](http://www.wampserver.com/en/) to set up the environment under Windows.

Clone Hackademic project,
To clone Hackademic,

`git clone https://github.com/Hackademic/hackademic.git`

After successful cloning of the Hackademic project, copy the contents into `/var/www`
We need to change the permissions of the file now,
After successful cloning, copy the folder into `/var/www`.
Next change the permissions of the folder with

`sudo chmod -R 765 hackademic`

Ensure that the Apache is started and SQL connection is also active. Point your browser towards `http://127.0.0.1/`
You will be prompted with Hackademic page. In case you have many sub-directories in `/var/www/`, the browser would throw up all the directories.
Choose hackademic from that.
Ensure that Apache is started and that the SQL connection is also active. Point your browser towards `http://127.0.0.1/`
You will be prompted with the Hackademic page. In case you have many sub-directories in `/var/www/`, the browser would list all the directories available.
Choose hackademic from those.

Now you will be prompted to Hackademic installation page.
Now you will be prompted with the Hackademic installation page.
Be sure to fill out all the fields.

1. Administrator Details

Fill any email id, username and password.
You will using this username and password, later to log in to hackademic.
You will be using this username and password, later on to log in to hackademic.

2. Database Settings

Expand All @@ -60,14 +58,13 @@ Be sure to fill out all the fields.
You should be able to log in.


After finish stage if you got a error
After the finish stage if you got an error

*Parse error: syntax error, unexpected '[' in /var/www/hackademic/model/common/class.ChallengeAttempts.php on line 363']'*

update the version of PHP you are using. Hackademic uses 5.4+.



Road Map and Getting Involved
-----------------------------

Expand All @@ -77,12 +74,12 @@ For a list of features we would like implemented you can see either the issues p

Involvement in the development and promotion of the Hackademic Challenges is actively encouraged!
You do not have to be a security expert in order to contribute.
Some of the ways you can help:
Some of the ways you can help are:

* Write Documentation
* Write Unit tests
* Develop themes and plugins
* Write Challenges or Articles or contribute security courses
* Write Challenges, Articles or contribute security courses

Please see [CONTRIBUTING.md](CONTRIBUTING.md) for installation guidelines and other developer-oriented explanations.

Expand Down
Loading