Skip to content

Commit 37798d1

Browse files
authored
Fix some typos
1 parent 2364a80 commit 37798d1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

composr.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ If we can get Composr CMS to unserialize this string and the resulting object ge
152152

153153
## A deeper look at Composr CMS
154154

155-
We will focus on the `ajax_tree_script` function in `/sources/ajax.php`. This function will run when you access `http://example.org/data/ajax_tree.php`. It is one of the functions that calls `unserialize` on user input without authentication. It starts by quickly checking if the site is in maintainance mode:
155+
We will focus on the `ajax_tree_script` function in `/sources/ajax.php`. This function will run when you access `http://example.org/data/ajax_tree.php`. It is one of the functions that calls `unserialize` on user input without authentication. It starts by quickly checking if the site is in maintenance mode:
156156
```php
157157
function ajax_tree_script()
158158
{
@@ -395,7 +395,7 @@ Now, we want this to work for PHP 7.2 and we're kinda getting desperate. Luckily
395395
* Objects that implement the `Serializable` interface
396396
* References
397397

398-
Objects that implement the `Serializable` interface contain two methods `serialize` and `unserialize`. When serializing such an object a string of the following format will be returned: `C:<number of characters in the class name>:"<class name>":<length of the output of the serialize method>:{<output of the serialize method>}`. Creating a serialized string in this format for an object of a class that doesn't implement `Serializable` will work but the deserialized object will not have any class memebers set. It is thus not very useful for our purposes but it does lead the way to a final working exploit:
398+
Objects that implement the `Serializable` interface contain two methods `serialize` and `unserialize`. When serializing such an object a string of the following format will be returned: `C:<number of characters in the class name>:"<class name>":<length of the output of the serialize method>:{<output of the serialize method>}`. Creating a serialized string in this format for an object of a class that doesn't implement `Serializable` will work but the deserialized object will not have any class members set. It is thus not very useful for our purposes but it does lead the way to a final working exploit:
399399

400400
There are a few PHP classes implementing `Serializable`, the most important of which (for our purposes here) is `SplDoublyLinkedList`. This is the important part of the C code that handles serialization for `SplDoublyLinkedList`:
401401
```c
@@ -414,7 +414,7 @@ There are a few PHP classes implementing `Serializable`, the most important of w
414414
}
415415
```
416416
417-
It shows that the elements of a `SplDoublyLinkedList` are serialized just like `serialize` would serialize them _but they are seperated by colons_. This provides us with a way to bypass the regex:
417+
It shows that the elements of a `SplDoublyLinkedList` are serialized just like `serialize` would serialize them _but they are separated by colons_. This provides us with a way to bypass the regex:
418418
```php
419419
class HelloWorld {
420420

0 commit comments

Comments
 (0)