Running Metasploit Kali Error :/usr/share/metasploit-framework/lib/msf/core/payload/android.rb:87:in not_after=': bignum too big to convert intolong' (RangeError)

Error :

root@kali:~# service postgresql start
root@kali:~# msfconsole
/usr/share/metasploit-framework/lib/msf/core/payload/android.rb:87:in not_after=': bignum too big to convert intolong' (RangeError)
from /usr/share/metasploit-framework/lib/msf/core/payload/android.rb:87:in sign_jar' from /usr/share/metasploit-framework/lib/msf/core/payload/android.rb:118:ingenerate_jar'
from /usr/share/metasploit-framework/lib/msf/core/payload/android.rb:38:in generate' from /usr/share/metasploit-framework/lib/msf/core/payload.rb:204:insize'
from /usr/share/metasploit-framework/lib/msf/core/payload_set.rb:158:in block (2 levels) in recalculate' from /usr/share/metasploit-framework/lib/msf/core/payload_set.rb:102:ineach_pair'
from /usr/share/metasploit-framework/lib/msf/core/payload_set.rb:102:in block in recalculate' from /usr/share/metasploit-framework/lib/msf/core/payload_set.rb:98:ineach_pair'
from /usr/share/metasploit-framework/lib/msf/core/payload_set.rb:98:in recalculate' from /usr/share/metasploit-framework/lib/msf/core/modules/loader/base.rb:251:inblock in load_modules'
from /usr/share/metasploit-framework/lib/msf/core/modules/loader/base.rb:248:in each' from /usr/share/metasploit-framework/lib/msf/core/modules/loader/base.rb:248:inload_modules'
from /usr/share/metasploit-framework/lib/msf/core/module_manager/loading.rb:119:in block in load_modules' from /usr/share/metasploit-framework/lib/msf/core/module_manager/loading.rb:117:ineach'
from /usr/share/metasploit-framework/lib/msf/core/module_manager/loading.rb:117:in load_modules' from /usr/share/metasploit-framework/lib/msf/core/module_manager/module_paths.rb:41:inblock in add_module_path'
from /usr/share/metasploit-framework/lib/msf/core/module_manager/module_paths.rb:40:in each' from /usr/share/metasploit-framework/lib/msf/core/module_manager/module_paths.rb:40:inadd_module_path'
from /usr/share/metasploit-framework/lib/msf/base/simple/framework/module_paths.rb:50:in block in init_module_paths' from /usr/share/metasploit-framework/lib/msf/base/simple/framework/module_paths.rb:49:ineach'
from /usr/share/metasploit-framework/lib/msf/base/simple/framework/module_paths.rb:49:in init_module_paths' from /usr/share/metasploit-framework/lib/msf/ui/console/driver.rb:219:ininitialize'
from /usr/share/metasploit-framework/lib/metasploit/framework/command/console.rb:62:in new' from /usr/share/metasploit-framework/lib/metasploit/framework/command/console.rb:62:indriver'
from /usr/share/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in start' from /usr/share/metasploit-framework/lib/metasploit/framework/command/base.rb:82:instart'
from /usr/bin/msfconsole:48:in `<main>'


Solution :
To fix this issue change
cert.not_after = cert.not_before + 3600*24*365*20 # 20 years
to
cert.not_after = cert.not_before + 3600*24*365*2 # 2 years
On line 87~ of the /usr/share/metasploit-framework/lib/msf/core/payload/android.rb file.
This is an issue with the cert generation in this payload - it should work after a few times but this will work around the issue for now while they work on a fix.

Comments

Popular posts from this blog

Fire Fox: Not Able to Access SSL Website while Intercepting MOZILLA_PKIX_ERROR_MITM_DETECTED,

ENABLE SSH ON KALI LINUX

Due Care And Due Diligence